    <!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <link rel="canonical" href="https://blog.csdn.net/senkkes/article/details/49804747"/>
    <meta http-equiv="content-type" content="text/html; charset=utf-8">
    <meta name="renderer" content="webkit"/>
    <meta name="force-rendering" content="webkit"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <meta name="report" content='{"pid": "blog", "spm":"1001.2101"}'>
    <meta name="referrer" content="always">
    <meta http-equiv="Cache-Control" content="no-siteapp" /><link rel="alternate" media="handheld" href="#" />
    <meta name="shenma-site-verification" content="5a59773ab8077d4a62bf469ab966a63b_1497598848">
    <meta name="applicable-device" content="pc">
    <link  href="https://g.csdnimg.cn/static/logo/favicon32.ico"  rel="shortcut icon" type="image/x-icon" />
    <title>Qt中丰富的容器类---数组QVector、链表QLinkedList、映射表QMap、哈希表QHash_qt 数组-CSDN博客</title>
    <script>
      (function(){ 
        var el = document.createElement("script"); 
        el.src = "https://s3a.pstatp.com/toutiao/push.js?1abfa13dfe74d72d41d83c86d240de427e7cac50c51ead53b2e79d40c7952a23ed7716d05b4a0f683a653eab3e214672511de2457e74e99286eb2c33f4428830"; 
        el.id = "ttzz"; 
        var s = document.getElementsByTagName("script")[0]; 
        s.parentNode.insertBefore(el, s);
      })(window)
    </script>
        <meta name="keywords" content="qt 数组">
        <meta name="csdn-baidu-search"  content='{"autorun":true,"install":true,"keyword":"qt 数组"}'>
    <meta name="description" content="文章浏览阅读1.8k次。在C++里做大型程序时，少不了要与数组、链表等数据结构打交道。就是最简单的字符串也常常让头痛万分，Qt中有QString解决了字符串的头痛，那么其他数组等有没有更简单的解决方案呢？Qt作为一款优秀的类型库，当然不会没考虑这些。Qt提供了大量的“容器类”，专门用于以某种方式存储大量内容，QString其实只是这大量的容器类的一种。我在这里介绍：QVector(数组)、QLinkedL_qt 数组">
        <link rel="stylesheet" type="text/css" href="https://csdnimg.cn/release/blogv2/dist/pc/css/detail_enter-62005624ac.min.css">
    <script type="application/ld+json">{"@context":"https://ziyuan.baidu.com/contexts/cambrian.jsonld","@id":"https://blog.csdn.net/senkkes/article/details/49804747","appid":"1638831770136827","pubDate":"2015-11-12T21:10:12","title":"Qt中丰富的容器类---数组QVector、链表QLinkedList、映射表QMap、哈希表QHash_qt 数组-CSDN博客","upDate":"2015-11-12T21:10:12"}</script>
        <link rel="stylesheet" type="text/css" href="https://csdnimg.cn/release/blogv2/dist/pc/themesSkin/skin3-template/skin3-template-762f7595fd.min.css">
    <script src="https://g.csdnimg.cn/lib/jquery/1.12.4/jquery.min.js" type="text/javascript"></script>
    <script src="https://g.csdnimg.cn/lib/jquery-migrate/1.4.1/jquery-migrate.js" type="text/javascript"></script>
    <script type="text/javascript">
        var isCorporate = false;
        var username =  "senkkes";
        var skinImg = "white";

        var blog_address = "https://blog.csdn.net/senkkes";
        var currentUserName = "wj78080458";
        var isOwner = false;
        var loginUrl = "http://passport.csdn.net/account/login?from=https://blog.csdn.net/senkkes/article/details/49804747";
        var blogUrl = "https://blog.csdn.net/";
        var avatar = "https://profile-avatar.csdnimg.cn/3e35cd7496874e929dd848d757703318_senkkes.jpg!1";
        var articleTitle = "Qt中丰富的容器类---数组QVector、链表QLinkedList、映射表QMap、哈希表QHash";
        var articleDesc = "文章浏览阅读1.8k次。在C++里做大型程序时，少不了要与数组、链表等数据结构打交道。就是最简单的字符串也常常让头痛万分，Qt中有QString解决了字符串的头痛，那么其他数组等有没有更简单的解决方案呢？Qt作为一款优秀的类型库，当然不会没考虑这些。Qt提供了大量的“容器类”，专门用于以某种方式存储大量内容，QString其实只是这大量的容器类的一种。我在这里介绍：QVector(数组)、QLinkedL_qt 数组";
        var articleTitles = "Qt中丰富的容器类---数组QVector、链表QLinkedList、映射表QMap、哈希表QHash_qt 数组-CSDN博客";
        var nickName = "senkkes";
        var articleDetailUrl = "https://blog.csdn.net/senkkes/article/details/49804747";
        var vipUrlV = "https://mall.csdn.net/vip?vipSource=learningVip";
        if(window.location.host.split('.').length == 3) {
            blog_address = blogUrl + username;
        }
        var skinStatus = "White";
        var blogStaticHost = "https://csdnimg.cn/release/blogv2/"
          var payColumn = false
    </script>
        <meta name="toolbar" content='{"type":"0","fixModel":"1"}'>
    <script src="https://g.csdnimg.cn/??fixed-sidebar/1.1.7/fixed-sidebar.js" type="text/javascript"></script>
      <script src="https://cdn-static-devbit.csdn.net/ai100/chat/chat-search.js?v=2" type="text/javascript"></script>
    <script src='//g.csdnimg.cn/common/csdn-report/report.js' type='text/javascript'></script>
    <link rel="stylesheet" type="text/css" href="https://csdnimg.cn/public/sandalstrap/1.4/css/sandalstrap.min.css">
    <style>
        .MathJax, .MathJax_Message, .MathJax_Preview{
            display: none
        }
    </style>
    <script src="https://dup.baidustatic.com/js/ds.js"></script>
      <script type="text/javascript">
        (function(c,l,a,r,i,t,y){
            c[a]=c[a]||function(){(c[a].q=c[a].q||[]).push(arguments)};
            t=l.createElement(r);t.async=1;t.src="https://www.clarity.ms/tag/"+i;
            y=l.getElementsByTagName(r)[0];y.parentNode.insertBefore(t,y);
        })(window, document, "clarity", "script", "lgtpix6r85");
      </script>
    <script src="/cdn_cgi_bs_captcha/static/js/waf_captcha_embedded_bs.js"></script>
</head>
  <body class="nodata " style="">
    <div id="toolbarBox" style="min-height: 48px;"></div>
        <script>
            var toolbarSearchExt = '{"landingWord":["qt 数组"],"queryWord":"","tag":[],"title":"Qt中丰富的容器类---数组QVector、链表QLinkedList、映射表QMap、哈希表QHash"}';
        </script>
    <script src="https://g.csdnimg.cn/common/csdn-toolbar/csdn-toolbar.js" type="text/javascript"></script>
    <script>
    (function(){
        var bp = document.createElement('script');
        var curProtocol = window.location.protocol.split(':')[0];
        if (curProtocol === 'https') {
            bp.src = 'https://zz.bdstatic.com/linksubmit/push.js';
        }
        else {
            bp.src = 'http://push.zhanzhang.baidu.com/push.js';
        }
        var s = document.getElementsByTagName("script")[0];
        s.parentNode.insertBefore(bp, s);
    })();
    </script>

    <link rel="stylesheet" href="https://csdnimg.cn/release/blogv2/dist/pc/css/blog_code-01256533b5.min.css">
    <link rel="stylesheet" href="https://csdnimg.cn/release/blogv2/dist/mdeditor/css/editerView/chart-3456820cac.css" />
    <link rel="stylesheet" href="https://g.csdnimg.cn/lib/swiper/6.0.4/css/swiper.css" />
    <script src="https://g.csdnimg.cn/lib/swiper/6.0.4/js/swiper.js" async></script>
    <script>
      var articleId = 49804747;
        var privateEduData = [{"url":"https://marketing.csdn.net/p/3127db09a98e0723b83b2914d9256174?pId=2782&utm_source=glcblog","words":"函数"},{"url":"https://marketing.csdn.net/p/3127db09a98e0723b83b2914d9256174?pId=2782&utm_source=glcblog","words":"string"},{"url":"https://marketing.csdn.net/p/3127db09a98e0723b83b2914d9256174?pId=2782&utm_source=glcblog","words":"关联容器"},{"url":"https://marketing.csdn.net/p/3127db09a98e0723b83b2914d9256174?pId=2782&utm_source=glcblog","words":"array"},{"url":"https://edu.csdn.net/course/detail/40020?utm_source=glcblog","words":"数据结构"}];//高亮数组
        var privateData = ["vector","operator","yi","dl"];//高亮数组
      var commentscount = 0;
      var commentAuth = 2;
      var curentUrl = "https://blog.csdn.net/senkkes/article/details/49804747";
      var myUrl = "https://my.csdn.net/";
      var isGitCodeBlog = false;
        var highlight = ["qvect","link","list","hash","---","哈希表","map","qt","容器","映射","丰富","链表","数组","ed","表","中","类"];//高亮数组
        var isRecommendModule = true;
          var isBaiduPre = true;
          var baiduCount = 2;
          var setBaiduJsCount = 10;
        var viewCountFormat = 1804;
      var share_card_url = "https://app-blog.csdn.net/share?article_id=49804747&username=senkkes"
      var mallVipUrl = "https://mall.csdn.net/vip?vipSource=article"
      var vipArticleAbStyle = "t_2"

      var vipArticleCpStyle = "t_2"
      var articleType = 2;
      var baiduKey = "qt 数组";
      var copyPopSwitch = true;
      var needInsertBaidu = true;
      var recommendRegularDomainArr = ["blog.csdn.net/.+/article/details/","download.csdn.net/download/","edu.csdn.net/course/detail/","ask.csdn.net/questions/","bbs.csdn.net/topics/","www.csdn.net/gather_.+/"]
      var codeStyle = "";
      var baiduSearchType = "baidulandingword";
      var sharData = "{\"hot\":[{\"id\":1,\"url\":\"https:\\/\\/img-blog.csdnimg.cn\\/a5f4260710904e538002a6ab337939b3.png\"},{\"id\":2,\"url\":\"https:\\/\\/img-blog.csdnimg.cn\\/188b37199a2c4b74b1d9ffc39e0d52de.png\"},{\"id\":3,\"url\":\"https:\\/\\/img-blog.csdnimg.cn\\/14ded358b631444581edd98a256bc5af.png\"},{\"id\":4,\"url\":\"https:\\/\\/img-blog.csdnimg.cn\\/1470f23a770444d986ad551b9c33c5be.png\"},{\"id\":5,\"url\":\"https:\\/\\/img-blog.csdnimg.cn\\/c329f5181dc74f6c9bd28c982bb9f91d.png\"},{\"id\":6,\"url\":\"https:\\/\\/img-blog.csdnimg.cn\\/ccd8a3305e81460f9c505c95b432a65f.png\"},{\"id\":7,\"url\":\"https:\\/\\/img-blog.csdnimg.cn\\/bc89d8283389440d97fc4d30e30f45e1.png\"},{\"id\":8,\"url\":\"https:\\/\\/img-blog.csdnimg.cn\\/452d485b4a654f5592390550d2445edf.png\"},{\"id\":9,\"url\":\"https:\\/\\/img-blog.csdnimg.cn\\/f8b9939db2ed474a8f43a643015fc8b7.png\"},{\"id\":10,\"url\":\"https:\\/\\/img-blog.csdnimg.cn\\/6de8864187ab4ed3b1db0856369c36ff.png\"},{\"id\":11,\"url\":\"https:\\/\\/img-blog.csdnimg.cn\\/673cc3470ff74072acba958dc0c46e2d.png\"},{\"id\":12,\"url\":\"https:\\/\\/img-blog.csdnimg.cn\\/930c119760ac4491804db80f9c6d4e3f.png\"},{\"id\":13,\"url\":\"https:\\/\\/img-blog.csdnimg.cn\\/15e6befb05a24233bc2b65e96aa8d972.png\"},{\"id\":14,\"url\":\"https:\\/\\/img-blog.csdnimg.cn\\/2075fd6822184b95a41e214de4daec13.png\"},{\"id\":15,\"url\":\"https:\\/\\/img-blog.csdnimg.cn\\/859b1552db244eb6891a809263a5c657.png\"},{\"id\":16,\"url\":\"https:\\/\\/img-blog.csdnimg.cn\\/0be2f920f1f74290a98921974a9613fd.png\"},{\"id\":17,\"url\":\"https:\\/\\/img-blog.csdnimg.cn\\/2e97e00b43f14afab494ea55ef3f4a6e.png\"},{\"id\":18,\"url\":\"https:\\/\\/img-blog.csdnimg.cn\\/ff4ab252f46e444686f5135d6ebbfec0.png\"},{\"id\":19,\"url\":\"https:\\/\\/img-blog.csdnimg.cn\\/ae029bbe99564e79911657912d36524f.png\"},{\"id\":20,\"url\":\"https:\\/\\/img-blog.csdnimg.cn\\/b3ece39963de440388728e9e7b9bf427.png\"},{\"id\":21,\"url\":\"https:\\/\\/img-blog.csdnimg.cn\\/6f14651a99ba486e926d63b6fa692997.png\"},{\"id\":22,\"url\":\"https:\\/\\/img-blog.csdnimg.cn\\/83ceddf050084875a341e32dcceca721.png\"},{\"id\":23,\"url\":\"https:\\/\\/img-blog.csdnimg.cn\\/b90368b8fd5d4c6c8c79a707d877cf7c.png\"},{\"id\":24,\"url\":\"https:\\/\\/img-blog.csdnimg.cn\\/aeffae14ecf14e079b2616528c9a393b.png\"},{\"id\":25,\"url\":\"https:\\/\\/img-blog.csdnimg.cn\\/c5a06b5a13d44d16bed868fc3384897a.png\"},{\"id\":26,\"url\":\"https:\\/\\/img-blog.csdnimg.cn\\/08b697658b844b318cea3b119e9541ef.png\"},{\"id\":27,\"url\":\"https:\\/\\/img-blog.csdnimg.cn\\/68ccb0b8d09346ac961d2b5c1a8c77bf.png\"},{\"id\":28,\"url\":\"https:\\/\\/img-blog.csdnimg.cn\\/a2227a247e37418cbe0ea972ba6a859b.png\"},{\"id\":29,\"url\":\"https:\\/\\/img-blog.csdnimg.cn\\/3a42825fede748f9993e5bb844ad350d.png\"},{\"id\":30,\"url\":\"https:\\/\\/img-blog.csdnimg.cn\\/8882abc1dd484224b636966ea38555c3.png\"},{\"id\":31,\"url\":\"https:\\/\\/img-blog.csdnimg.cn\\/4f6a5f636a3e444d83cf8cc06d87a159.png\"},{\"id\":32,\"url\":\"https:\\/\\/img-blog.csdnimg.cn\\/1953ef79c56b4407b78d7181bdff11c3.png\"},{\"id\":33,\"url\":\"https:\\/\\/img-blog.csdnimg.cn\\/c04a2a4f772948ed85b5b0380ed36287.png\"},{\"id\":34,\"url\":\"https:\\/\\/img-blog.csdnimg.cn\\/5b4fecd05091405ea04d8c0f53e9f2c7.png\"},{\"id\":35,\"url\":\"https:\\/\\/img-blog.csdnimg.cn\\/b89f576d700344e280d6ceb2a66c2420.png\"},{\"id\":36,\"url\":\"https:\\/\\/img-blog.csdnimg.cn\\/1c65780e11804bbd9971ebadb3d78bcf.png\"},{\"id\":37,\"url\":\"https:\\/\\/img-blog.csdnimg.cn\\/d590db2055f345db9706eb68a7ec151a.png\"},{\"id\":38,\"url\":\"https:\\/\\/img-blog.csdnimg.cn\\/fe602f80700b4f6fb3c4a9e4c135510e.png\"},{\"id\":39,\"url\":\"https:\\/\\/img-blog.csdnimg.cn\\/39ff2fcd31e04feba301a071976a0ba7.png\"},{\"id\":40,\"url\":\"https:\\/\\/img-blog.csdnimg.cn\\/f9b61b3d113f436b828631837f89fb39.png\"},{\"id\":41,\"url\":\"https:\\/\\/img-blog.csdnimg.cn\\/df1aca5f610c4ad48cd16da88c9c8499.png\"},{\"id\":42,\"url\":\"https:\\/\\/img-blog.csdnimg.cn\\/d7acf73a1e6b41399a77a85040e10961.png\"},{\"id\":43,\"url\":\"https:\\/\\/img-blog.csdnimg.cn\\/b7f1b63542524b97962ff649ab4e7e23.png\"}],\"vip\":[{\"id\":1,\"vipUrl\":\"https:\\/\\/img-home.csdnimg.cn\\/images\\/20220920101150.png\",\"url\":\"https:\\/\\/img-home.csdnimg.cn\\/images\\/20220920101154.png\"},{\"id\":2,\"vipUrl\":\"https:\\/\\/img-home.csdnimg.cn\\/images\\/20220920101204.png\",\"url\":\"https:\\/\\/img-home.csdnimg.cn\\/images\\/20220920101208.png\"},{\"id\":3,\"vipUrl\":\"https:\\/\\/img-home.csdnimg.cn\\/images\\/20220920101211.png\",\"url\":\"https:\\/\\/img-home.csdnimg.cn\\/images\\/20220920101215.png\"},{\"id\":4,\"vipUrl\":\"https:\\/\\/img-home.csdnimg.cn\\/images\\/20220920101218.png\",\"url\":\"https:\\/\\/img-home.csdnimg.cn\\/images\\/20220920101220.png\"},{\"id\":5,\"vipUrl\":\"https:\\/\\/img-home.csdnimg.cn\\/images\\/20220920101223.png\",\"url\":\"https:\\/\\/img-home.csdnimg.cn\\/images\\/20220920101226.png\"},{\"id\":6,\"vipUrl\":\"https:\\/\\/img-home.csdnimg.cn\\/images\\/20220922100635.png\",\"url\":\"https:\\/\\/img-home.csdnimg.cn\\/images\\/20220922100639.png\"},{\"id\":7,\"vipUrl\":\"https:\\/\\/img-home.csdnimg.cn\\/images\\/20220922100642.png\",\"url\":\"https:\\/\\/img-home.csdnimg.cn\\/images\\/20220922100644.png\"},{\"id\":8,\"vipUrl\":\"https:\\/\\/img-home.csdnimg.cn\\/images\\/20220922100647.png\",\"url\":\"https:\\/\\/img-home.csdnimg.cn\\/images\\/20220922100649.png\"},{\"id\":9,\"vipUrl\":\"https:\\/\\/img-home.csdnimg.cn\\/images\\/20220922100652.png\",\"url\":\"https:\\/\\/img-home.csdnimg.cn\\/images\\/20220922100655.png\"},{\"id\":10,\"vipUrl\":\"https:\\/\\/img-blog.csdnimg.cn\\/55de67481fde4b04b97ad78f11fe369a.png\",\"url\":\"https:\\/\\/img-blog.csdnimg.cn\\/bb2418fb537e4d78b10d8765ccd810c5.png\"},{\"id\":11,\"vipUrl\":\"https:\\/\\/img-blog.csdnimg.cn\\/579c713394584d128104ef1044023954.png\",\"url\":\"https:\\/\\/img-blog.csdnimg.cn\\/f420d9fbcf5548079d31b5e809b6d6cd.png\"},{\"id\":12,\"vipUrl\":\"https:\\/\\/img-blog.csdnimg.cn\\/75b7f3155ba642f5a4cc16b7baf44122.png\",\"url\":\"https:\\/\\/img-blog.csdnimg.cn\\/a9030f5877be401f8b340b80b0d91e64.png\"},{\"id\":13,\"vipUrl\":\"https:\\/\\/img-blog.csdnimg.cn\\/0903d33cafa54934be3780aa54ae958d.png\",\"url\":\"https:\\/\\/img-blog.csdnimg.cn\\/2cd8c8929f5a42fca5da2a0aeb456203.png\"},{\"id\":14,\"vipUrl\":\"https:\\/\\/img-blog.csdnimg.cn\\/949fd7c22884439fbfc3c0e9c3b8dee7.png\",\"url\":\"https:\\/\\/img-blog.csdnimg.cn\\/dafbea9bd9eb4f3b962b48dc41657f89.png\"},{\"id\":15,\"vipUrl\":\"https:\\/\\/img-blog.csdnimg.cn\\/4119cfddd71d4e6a8a27a18dbb74d90e.png\",\"url\":\"https:\\/\\/img-blog.csdnimg.cn\\/c56310c8b6384d9e85388e4e342ce508.png\"},{\"id\":16,\"vipUrl\":\"https:\\/\\/img-blog.csdnimg.cn\\/121575274da142bcbbbbc2e8243dd411.png\",\"url\":\"https:\\/\\/img-blog.csdnimg.cn\\/5013993de06542f881018bb9abe2edf7.png\"},{\"id\":17,\"vipUrl\":\"https:\\/\\/img-blog.csdnimg.cn\\/4d97aa6dd4fe4f09a6bef5bdf8a6abcd.png\",\"url\":\"https:\\/\\/img-blog.csdnimg.cn\\/76f23877b6ad4066ad45ce8e31b4b977.png\"},{\"id\":18,\"vipUrl\":\"https:\\/\\/img-blog.csdnimg.cn\\/fdb619daf21b4c829de63b9ebc78859d.png\",\"url\":\"https:\\/\\/img-blog.csdnimg.cn\\/a1abe5d27a5441f599adfe662f510243.png\"},{\"id\":19,\"vipUrl\":\"https:\\/\\/img-blog.csdnimg.cn\\/676b7707bb11410f8f56bc0ed2b2345c.png\",\"url\":\"https:\\/\\/img-blog.csdnimg.cn\\/7ac5b467fbf24e1d8c2de3f3332c4f54.png\"},{\"id\":20,\"vipUrl\":\"https:\\/\\/img-blog.csdnimg.cn\\/0becb8cc227e4723b765bdd69a20fd4a.png\",\"url\":\"https:\\/\\/img-blog.csdnimg.cn\\/fdec85b26091486b9a89d0b8d45c3749.png\"},{\"id\":21,\"vipUrl\":\"https:\\/\\/img-blog.csdnimg.cn\\/1a6c06235ad44941b38c54cbc25a370c.png\",\"url\":\"https:\\/\\/img-blog.csdnimg.cn\\/410a06cda2d44b0c84578f88275caf70.png\"}],\"map\":{\"hot\":\"热门\",\"vip\":\"VIP\"}}";
      
      var canRead = true;
      var blogMoveHomeArticle = false;
      var showSearchText = "";
      var sideToolbarResult = "exp";
      var articleSource = 1;
      var articleReport = '{"pid": "blog", "spm":"1001.2101"}';
        var baiduSearchChannel = 'pc_relevant'
        var baiduSearchIdentification = '.235^v43^pc_blog_bottom_relevance_base7'
        var distRequestId = '1733930486580_55075'
        var initRewardObject = {
          giver: currentUserName,
          anchor: username,
          articleId: articleId,
          sign: ''
        }
        var isLikeStatus = false;
        var isUnLikeStatus = false;
        var studyLearnWord = "";
        var unUseCount = 0;
        var codeMaxSize = 0;
        var overCost = true;
        var isCurrentUserVip = false;
        var contentViewsHeight = 0;
        var contentViewsCount = 0;
        var contentViewsCountLimit = 5;
        var isShowConcision = true
        var lastTime = 0
        var postTime = "2015-11-12 21:10:12"
      var isCookieConcision = false
      var isHasDirectoryModel = false
      var isShowSideModel = false
      var isShowDirectoryModel = true
      function getCookieConcision(sName){
        var allCookie = document.cookie.split("; ");
        for (var i=0; i < allCookie.length; i++){
          var aCrumb = allCookie[i].split("=");
          if (sName == aCrumb[0])
            return aCrumb[1];
        }
        return null;
      }
      if (getCookieConcision('blog_details_concision') && getCookieConcision('blog_details_concision') == 0){
        isCookieConcision = true
        isShowSideModel = true
        isShowDirectoryModel = false
      }
    </script>
        <div class="main_father clearfix d-flex justify-content-center mainfather-concision" style="height:100%;">
          <div class="container clearfix container-concision" id="mainBox">
          <script>
          if (!isCookieConcision) {
            $('.main_father').removeClass('mainfather-concision')
            $('.main_father .container').removeClass('container-concision')
          } else {
            $('#mainBox').css('margin-right', '0')
          }
          </script>
          <main>
<script type="text/javascript">
    var resourceId =  "";
    function getQueryString(name) {   
      var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); //构造一个含有目标参数的正则表达式对象  
      var r = window.location.search.substr(1).match(reg);  //匹配目标参数
      if( r != null ) return decodeURIComponent( r[2] ); return '';   
    }
    function stripscript(s){ 
      var pattern = new RegExp("[`~!@#$^&*()=|{}':;',\\[\\].<>/?~！@#￥……&*（）——|{}【】‘；：”“'。，、？%]") 
      var rs = ""; 
      for (var i = 0; i < s.length; i++) { 
        rs = rs+s.substr(i, 1).replace(pattern, ''); 
      } 
      return rs;
    }
    var blogHotWords = stripscript(getQueryString('utm_term')).length > 1 ? stripscript(getQueryString('utm_term')) : ''
</script>
<div class="blog-content-box">
    <div class="article-header-box">
        <div class="article-header">
            <div class="article-title-box">
                <h1 class="title-article" id="articleContentId">Qt中丰富的容器类---数组QVector、链表QLinkedList、映射表QMap、哈希表QHash</h1>
            </div>
            <div class="article-info-box">
                    <div class="up-time">最新推荐文章于&nbsp;2024-10-15 23:45:52&nbsp;发布</div>
                <div class="article-bar-top">
                    <img class="article-type-img" src="https://csdnimg.cn/release/blogv2/dist/pc/img/reprint.png" alt="">
                    <div class="bar-content">
                      <a class="follow-nickName " href="https://blog.csdn.net/senkkes" target="_blank" rel="noopener" title="senkkes">senkkes</a>
                    <img class="article-time-img article-heard-img" src="https://csdnimg.cn/release/blogv2/dist/pc/img/newCurrentTime2.png" alt="">
                          <span class="time blog-postTime" data-time="2015-11-12 21:10:12">最新推荐文章于&nbsp;2024-10-15 23:45:52&nbsp;发布</span>
                   <div class="read-count-box">
                      <img class="article-read-img article-heard-img" src="https://csdnimg.cn/release/blogv2/dist/pc/img/articleReadEyes2.png" alt="">
                      <span class="read-count">阅读量1.8k</span>
                      <a id="blog_detail_zk_collection" class="un-collection" data-report-click='{"mod":"popu_823","spm":"1001.2101.3001.4232","ab":"new"}'>
                          <img class="article-collect-img article-heard-img un-collect-status isdefault" style="display:inline-block" src="https://csdnimg.cn/release/blogv2/dist/pc/img/tobarCollect2.png" alt="">
                          <img class="article-collect-img article-heard-img collect-status isactive" style="display:none" src="https://csdnimg.cn/release/blogv2/dist/pc/img/tobarCollectionActive2.png" alt="">
                          <span class="name">收藏</span>
                          <span class="get-collection">
                              4
                          </span>
                      </a>
                      <div class="read-count-box is-like">
                        <img class="article-read-img article-heard-img" style="display:none" id="is-like-imgactive-new" src="https://csdnimg.cn/release/blogv2/dist/pc/img/newHeart2023Active.png" alt="">
                        <img class="article-read-img article-heard-img" style="display:block" id="is-like-img-new" src="https://csdnimg.cn/release/blogv2/dist/pc/img/newHeart2023Black.png" alt="">
                        <span class="read-count" id="blog-digg-num">点赞数
                        </span>
                      </div>
                    </div>
                  </div>
                </div>
                <div class="blog-tags-box">
                    <div class="tags-box artic-tag-box">
                    </div>
                </div>
                <div class="slide-content-box">
                </div>
                
                <div class="operating">
                </div>
            </div>
        </div>

    </div>
    <div id="blogHuaweiyunAdvert"></div>
    <article class="baidu_pl">
        <div id="article_content" class="article_content clearfix">
        <link rel="stylesheet" href="https://csdnimg.cn/release/blogv2/dist/mdeditor/css/editerView/kdoc_html_views-1a98987dfd.css">
        <link rel="stylesheet" href="https://csdnimg.cn/release/blogv2/dist/mdeditor/css/editerView/ck_htmledit_views-704d5b9767.css">
             
                <div id="content_views" class="htmledit_views">
                    <p style="margin:10px auto; font-family:&#39;black Verdana&#39;,Arial,Helvetica,sans-serif; font-size:14px; line-height:21px"> 在C&#43;&#43;里做大型程序时&#xff0c;少不了要与数组、链表等数据结构打交道。就是最简单的字符串也常常让头痛万分&#xff0c;Qt中有QString解决了字符串的头痛&#xff0c;那么其他数组等有没有更简单的解决方案呢&#xff1f;Qt作为一款优秀的类型库&#xff0c;当然不会没考虑这些。Qt提供了大量的“容器类”&#xff0c;专门用于以某种方式存储大量内容&#xff0c;QString其实只是这大量的容器类的一种。</p> 
<p style="margin:10px auto; font-family:&#39;black Verdana&#39;,Arial,Helvetica,sans-serif; font-size:14px; line-height:21px"> 我在这里介绍&#xff1a;</p> 
<p style="margin:10px auto; font-family:&#39;black Verdana&#39;,Arial,Helvetica,sans-serif; font-size:14px; line-height:21px"> <span style="color:rgb(0,0,128)">QVector(数组)、QLinkedList(链表)、QMap(映射表)、QHash(哈希表)</span> </p> 
<p style="margin:10px auto; font-family:&#39;black Verdana&#39;,Arial,Helvetica,sans-serif; font-size:14px; line-height:21px"> <strong><span style="color:rgb(0,0,128)">QVector</span></strong>&#xff0c;是Qt对所有数组的封装&#xff0c;比如我们想要一个int类型数组&#xff0c;我们原先会写int array[10]&#xff0c;我们在Qt里可以写QVector&lt;int&gt; array(10)</p> 
<p style="margin:10px auto; font-family:&#39;black Verdana&#39;,Arial,Helvetica,sans-serif; font-size:14px; line-height:21px"> 赋值的时候&#xff0c;我们依然可以照旧array[5]&#61;4;想获取某一项的值也还可以array[9]&#xff0c;也就是说&#xff0c;原来的特性我们还可以用。</p> 
<p style="margin:10px auto; font-family:&#39;black Verdana&#39;,Arial,Helvetica,sans-serif; font-size:14px; line-height:21px"> 那么QVector有什么好处呢&#xff1f;</p> 
<p style="margin:10px auto; font-family:&#39;black Verdana&#39;,Arial,Helvetica,sans-serif; font-size:14px; line-height:21px"> ·我们可以用count函数获知数组中有多少个元素&#xff0c;方便遍历</p> 
<p style="margin:10px auto; font-family:&#39;black Verdana&#39;,Arial,Helvetica,sans-serif; font-size:14px; line-height:21px"> ·原先我们必须预定义好大小&#xff0c;而用QVector我们虽然最好也先定义好大小&#xff0c;但是预先不定义也可以。</p> 
<p style="margin:10px auto; font-family:&#39;black Verdana&#39;,Arial,Helvetica,sans-serif; font-size:14px; line-height:21px"> 我们可以使用append函数或者&lt;&lt;操作符来在数组最后端添加元素而不用担心溢出问题。</p> 
<div class="cnblogs_Highlighter" style="word-wrap:break-word; font-family:&#39;black Verdana&#39;,Arial,Helvetica,sans-serif; font-size:14px; line-height:21px"> 
 <div style="word-wrap:break-word"> 
  <div id="highlighter_524980" class="syntaxhighlighter nogutter  csharp" style="word-wrap:break-word; width:1017px; margin:1em 0px!important; position:relative!important; overflow:auto!important; font-size:1em!important"> 
   <table border="0" cellpadding="0" cellspacing="0" style="border:1px solid silver; width:1017px; border-collapse:collapse; word-break:break-word; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.1em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; font-size:12px!important; min-height:inherit!important"><tbody style="border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.1em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; min-height:inherit!important"><tr style="border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.1em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; min-height:inherit!important"><td class="code" style="border:1px solid silver; padding:3px; border-collapse:collapse; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.1em!important; margin:0px!important; outline:0px!important; overflow:visible!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important"> 
       <div class="container" style="word-wrap:break-word; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.1em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:relative!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; min-height:inherit!important"> 
        <div class="line number1 index0 alt2" style="word-wrap:break-word; background-color:rgb(244,244,244)!important; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px 1em 0px 0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; min-height:inherit!important"> 
         <code class="csharp plain" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important">QVector&lt;</code> 
         <code class="csharp keyword" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important; color:rgb(0,0,255)!important">double</code> 
         <code class="csharp plain" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important">&gt; vect(2); </code> 
        </div> 
        <div class="line number2 index1 alt1" style="word-wrap:break-word; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px 1em 0px 0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; min-height:inherit!important"> 
         <code class="csharp plain" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important">vect[0] &#61; 1.0; </code> 
        </div> 
        <div class="line number3 index2 alt2" style="word-wrap:break-word; background-color:rgb(244,244,244)!important; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px 1em 0px 0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; min-height:inherit!important"> 
         <code class="csharp plain" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important">vect[1] &#61; 2.0; </code> 
        </div> 
        <div class="line number4 index3 alt1" style="word-wrap:break-word; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px 1em 0px 0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; min-height:inherit!important"> 
         <code class="csharp keyword" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important; color:rgb(0,0,255)!important">for</code>  
         <code class="csharp plain" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important">(</code> 
         <code class="csharp keyword" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important; color:rgb(0,0,255)!important">int</code>  
         <code class="csharp plain" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important">i &#61; 0; i &lt; vect.count(); &#43;&#43;i) {<!-- --></code> 
        </div> 
        <div class="line number5 index4 alt2" style="word-wrap:break-word; background-color:rgb(244,244,244)!important; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px 1em 0px 0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; min-height:inherit!important"> 
         <code class="csharp spaces" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important">    </code> 
         <code class="csharp plain" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important">cout &lt;&lt; vect[i] &lt;&lt; endl; </code> 
        </div> 
        <div class="line number6 index5 alt1" style="word-wrap:break-word; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px 1em 0px 0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; min-height:inherit!important"> 
         <code class="csharp plain" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important">}</code> 
        </div> 
        <div class="line number7 index6 alt2" style="word-wrap:break-word; background-color:rgb(244,244,244)!important; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px 1em 0px 0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; min-height:inherit!important">
            
        </div> 
        <div class="line number8 index7 alt1" style="word-wrap:break-word; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px 1em 0px 0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; min-height:inherit!important"> 
         <code class="csharp keyword" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important; color:rgb(0,0,255)!important">for</code>  
         <code class="csharp plain" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important">(</code> 
         <code class="csharp keyword" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important; color:rgb(0,0,255)!important">int</code>  
         <code class="csharp plain" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important">i &#61; 0; i &lt; vect.count(); &#43;&#43;i) {<!-- --></code> 
        </div> 
        <div class="line number9 index8 alt2" style="word-wrap:break-word; background-color:rgb(244,244,244)!important; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px 1em 0px 0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; min-height:inherit!important"> 
         <code class="csharp spaces" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important">    </code> 
         <code class="csharp plain" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important">cout &lt;&lt; vect.at(i) &lt;&lt; endl; </code> 
        </div> 
        <div class="line number10 index9 alt1" style="word-wrap:break-word; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px 1em 0px 0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; min-height:inherit!important"> 
         <code class="csharp plain" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important">}</code> 
        </div> 
       </div> </td></tr></tbody></table> 
  </div> 
 </div> 
</div> 
<p style="margin:10px auto; font-family:&#39;black Verdana&#39;,Arial,Helvetica,sans-serif; font-size:14px; line-height:21px"> <span style="font-family:永中宋体; word-break:normal; word-wrap:normal"><span style="line-height:19px; word-break:normal; word-wrap:normal">要使用索引方式設定元素&#xff0c;必須先配置好夠長的空間&#xff0c;否則會發生超出索引範圍的錯誤&#xff0c;使用</span></span><span style="font-family:&#39;DejaVu Serif Condensed&#39;,serif; word-break:normal; word-wrap:normal"><span style="line-height:19px; word-break:normal; word-wrap:normal"><span lang="en-US" style="word-break:normal; word-wrap:normal">[]</span></span></span><span style="font-family:永中宋体; word-break:normal; word-wrap:normal"><span style="line-height:19px; word-break:normal; word-wrap:normal">運算子指定索引存取的方式是比較方便&#xff0c;但在某些場合下&#xff0c;使用</span></span><span style="font-family:&#39;DejaVu Serif Condensed&#39;,serif; word-break:normal; word-wrap:normal"><span style="line-height:19px; word-break:normal; word-wrap:normal"><span lang="en-US" style="word-break:normal; word-wrap:normal">at()</span></span></span><span style="font-family:永中宋体; word-break:normal; word-wrap:normal"><span style="line-height:19px; word-break:normal; word-wrap:normal">方法會較有效率一些&#xff0c;這涉及</span></span><span style="font-family:&#39;DejaVu Serif Condensed&#39;,serif; word-break:normal; word-wrap:normal"><span style="line-height:19px; word-break:normal; word-wrap:normal"><span lang="en-US" style="word-break:normal; word-wrap:normal">Qt</span></span></span><span style="font-family:永中宋体; word-break:normal; word-wrap:normal"><span style="line-height:19px; word-break:normal; word-wrap:normal">的隱式共享機制&#xff0c;稍後再作介紹。</span></span><span style="font-family:&#39;DejaVu Serif Condensed&#39;,serif; word-break:normal; word-wrap:normal"><span style="line-height:19px; word-break:normal; word-wrap:normal"><span lang="en-US" style="word-break:normal; word-wrap:normal"><br /> </span></span></span><span style="font-family:永中宋体; word-break:normal; word-wrap:normal"><span style="line-height:19px; word-break:normal; word-wrap:normal">您也可以使用</span></span><span style="font-family:&#39;DejaVu Serif Condensed&#39;,serif; word-break:normal; word-wrap:normal"><span style="line-height:19px; word-break:normal; word-wrap:normal"><span lang="en-US" style="word-break:normal; word-wrap:normal">QVector</span></span></span><span style="font-family:永中宋体; word-break:normal; word-wrap:normal"><span style="line-height:19px; word-break:normal; word-wrap:normal">的</span></span><span style="font-family:&#39;DejaVu Serif Condensed&#39;,serif; word-break:normal; word-wrap:normal"><span style="line-height:19px; word-break:normal; word-wrap:normal"><span lang="en-US" style="word-break:normal; word-wrap:normal">append()</span></span></span><span style="font-family:永中宋体; word-break:normal; word-wrap:normal"><span style="line-height:19px; word-break:normal; word-wrap:normal">方法來加入元素&#xff0c;使用</span></span><span style="font-family:&#39;DejaVu Serif Condensed&#39;,serif; word-break:normal; word-wrap:normal"><span style="line-height:19px; word-break:normal; word-wrap:normal"><span lang="en-US" style="word-break:normal; word-wrap:normal">remove()</span></span></span><span style="font-family:永中宋体; word-break:normal; word-wrap:normal"><span style="line-height:19px; word-break:normal; word-wrap:normal">方法來移除元素&#xff0c;使用</span></span><span style="font-family:&#39;DejaVu Serif Condensed&#39;,serif; word-break:normal; word-wrap:normal"><span style="line-height:19px; word-break:normal; word-wrap:normal"><span lang="en-US" style="word-break:normal; word-wrap:normal">insert()</span></span></span><span style="font-family:永中宋体; word-break:normal; word-wrap:normal"><span style="line-height:19px; word-break:normal; word-wrap:normal">方法來插入元素&#xff0c;例如</span></span><span style="font-family:&#39;DejaVu Serif Condensed&#39;,serif; word-break:normal; word-wrap:normal"><span style="line-height:19px; word-break:normal; word-wrap:normal"><span lang="en-US" style="word-break:normal; word-wrap:normal">append()</span></span></span><span style="font-family:永中宋体; word-break:normal; word-wrap:normal"><span style="line-height:19px; word-break:normal; word-wrap:normal">的使用如下&#xff1a;</span></span></p> 
<p align="left" style="margin-top:0px; margin-bottom:5px; font-family:&#39;black Verdana&#39;,Arial,Helvetica,sans-serif; font-size:14px; line-height:21px; border-width:0px; padding-top:0px; padding-bottom:0px; list-style-type:none; word-break:normal; word-wrap:normal"> <span style="font-family:&#39;DejaVu Serif Condensed&#39;,serif; word-break:normal; word-wrap:normal"><strong><span style="line-height:19px; word-break:normal; word-wrap:normal"><span lang="en-US" style="word-break:normal; word-wrap:normal">vect.append(3.0);</span></span><span style="line-height:19px; word-break:normal; word-wrap:normal"><span lang="en-US" style="word-break:normal; word-wrap:normal">vect.append(4.0);</span></span></strong></span></p> 
<p align="left" style="margin-top:0px; margin-bottom:5px; font-family:&#39;black Verdana&#39;,Arial,Helvetica,sans-serif; font-size:14px; line-height:21px; border-width:0px; padding-top:0px; padding-bottom:0px; list-style-type:none; word-break:normal; word-wrap:normal"> <span style="font-family:永中宋体; word-break:normal; word-wrap:normal"><span style="line-height:19px; word-break:normal; word-wrap:normal">或者是使用</span></span><span style="font-family:&#39;DejaVu Serif Condensed&#39;,serif; word-break:normal; word-wrap:normal"><span style="line-height:19px; word-break:normal; word-wrap:normal"><span lang="en-US" style="word-break:normal; word-wrap:normal">&lt;&lt;</span></span></span><span style="font-family:永中宋体; word-break:normal; word-wrap:normal"><span style="line-height:19px; word-break:normal; word-wrap:normal">運算子附加元素&#xff1a;</span></span></p> 
<p align="left" style="margin-top:0px; margin-bottom:5px; font-family:&#39;black Verdana&#39;,Arial,Helvetica,sans-serif; font-size:14px; line-height:21px; border-width:0px; padding-top:0px; padding-bottom:0px; list-style-type:none; word-break:normal; word-wrap:normal"> <span style="font-family:&#39;DejaVu Serif Condensed&#39;,serif; word-break:normal; word-wrap:normal"><strong><span style="line-height:19px; word-break:normal; word-wrap:normal"><span lang="en-US" style="word-break:normal; word-wrap:normal">vect &lt;&lt; 5.0 &lt;&lt; 6.0;</span></span></strong></span></p> 
<p align="left" style="margin-top:0px; margin-bottom:5px; font-family:&#39;black Verdana&#39;,Arial,Helvetica,sans-serif; font-size:14px; line-height:21px; border-width:0px; padding-top:0px; padding-bottom:0px; list-style-type:none; word-break:normal; word-wrap:normal"> <span style="font-family:&#39;DejaVu Serif Condensed&#39;,serif; word-break:normal; word-wrap:normal"><span style="line-height:19px; word-break:normal; word-wrap:normal"><span lang="en-US" style="word-break:normal; word-wrap:normal">QVector</span></span></span> <span style="font-family:永中宋体; word-break:normal; word-wrap:normal"><span style="line-height:19px; word-break:normal; word-wrap:normal">也重載了一些其它的運算子&#xff0c;以及提供了一些其它可用的方法&#xff0c;請查詢</span></span><span style="font-family:&#39;DejaVu Serif Condensed&#39;,serif; word-break:normal; word-wrap:normal"><span style="line-height:19px; word-break:normal; word-wrap:normal"><span lang="en-US" style="word-break:normal; word-wrap:normal">Qt</span></span></span><span style="font-family:永中宋体; word-break:normal; word-wrap:normal"><span style="line-height:19px; word-break:normal; word-wrap:normal">線上文件有關於</span></span><span style="font-family:&#39;DejaVu Serif Condensed&#39;,serif; word-break:normal; word-wrap:normal"><span style="line-height:19px; word-break:normal; word-wrap:normal"><span lang="en-US" style="word-break:normal; word-wrap:normal">QVector</span></span></span><span style="font-family:永中宋体; word-break:normal; word-wrap:normal"><span style="line-height:19px; word-break:normal; word-wrap:normal">的介紹。</span></span><span style="font-family:&#39;DejaVu Serif Condensed&#39;,serif; word-break:normal; word-wrap:normal"><span style="line-height:19px; word-break:normal; word-wrap:normal"><span lang="en-US" style="word-break:normal; word-wrap:normal">QVector</span></span></span><span style="font-family:永中宋体; word-break:normal; word-wrap:normal"><span style="line-height:19px; word-break:normal; word-wrap:normal">提供的是鄰接的 記憶體空間以存取物件&#xff0c;所以對於循序存取或使</span></span></p> 
<p align="left" style="margin-top:0px; margin-bottom:5px; font-family:&#39;black Verdana&#39;,Arial,Helvetica,sans-serif; font-size:14px; line-height:21px; border-width:0px; padding-top:0px; padding-bottom:0px; list-style-type:none; word-break:normal; word-wrap:normal"> <span style="font-family:永中宋体; word-break:normal; word-wrap:normal"><span style="line-height:19px; word-break:normal; word-wrap:normal">QList <span style="line-height:21px; word-break:normal; word-wrap:normal"><span style="line-height:19px; word-break:normal; word-wrap:normal">的子類別</span></span><span style="line-height:21px; font-family:&#39;DejaVu Serif Condensed&#39;,serif; word-break:normal; word-wrap:normal"><span style="line-height:19px; word-break:normal; word-wrap:normal"><span lang="en-US" style="word-break:normal; word-wrap:normal">QStringList</span></span></span><span style="line-height:21px; word-break:normal; word-wrap:normal"><span style="line-height:19px; word-break:normal; word-wrap:normal">為</span></span><span style="line-height:21px; font-family:&#39;DejaVu Serif Condensed&#39;,serif; word-break:normal; word-wrap:normal"><span style="line-height:19px; word-break:normal; word-wrap:normal"><span lang="en-US" style="word-break:normal; word-wrap:normal">Qt</span></span></span><span style="line-height:21px; word-break:normal; word-wrap:normal"><span style="line-height:19px; word-break:normal; word-wrap:normal">中應用很廣的類別&#xff0c;可以讓您儲存</span></span><span style="line-height:21px; font-family:&#39;DejaVu Serif Condensed&#39;,serif; word-break:normal; word-wrap:normal"><span style="line-height:19px; word-break:normal; word-wrap:normal"><span lang="en-US" style="word-break:normal; word-wrap:normal">QString</span></span></span><span style="line-height:21px; word-break:normal; word-wrap:normal"><span style="line-height:19px; word-break:normal; word-wrap:normal">物件&#xff0c;</span></span><span style="line-height:21px; font-family:&#39;DejaVu Serif Condensed&#39;,serif; word-break:normal; word-wrap:normal"><span style="line-height:19px; word-break:normal; word-wrap:normal"><span lang="en-US" style="word-break:normal; word-wrap:normal">QList</span></span></span><span style="line-height:21px; word-break:normal; word-wrap:normal"><span style="line-height:19px; word-break:normal; word-wrap:normal">的子類別</span></span><span style="line-height:21px; font-family:&#39;DejaVu Serif Condensed&#39;,serif; word-break:normal; word-wrap:normal"><span style="line-height:19px; word-break:normal; word-wrap:normal"><span lang="en-US" style="word-break:normal; word-wrap:normal">QQueue</span></span></span><span style="line-height:21px; word-break:normal; word-wrap:normal"><span style="line-height:19px; word-break:normal; word-wrap:normal">則提供了佇列結構的容器管理。</span></span><span style="line-height:21px; font-family:&#39;DejaVu Serif Condensed&#39;,serif; word-break:normal; word-wrap:normal"><span style="line-height:19px; word-break:normal; word-wrap:normal"><span lang="en-US" style="word-break:normal; word-wrap:normal"><br /> </span></span></span><span style="line-height:21px; word-break:normal; word-wrap:normal"><span style="line-height:19px; word-break:normal; word-wrap:normal">以上先列出</span></span><span style="line-height:21px; font-family:&#39;DejaVu Serif Condensed&#39;,serif; word-break:normal; word-wrap:normal"><span style="line-height:19px; word-break:normal; word-wrap:normal"><span lang="en-US" style="word-break:normal; word-wrap:normal">QVector</span></span></span><span style="line-height:21px; word-break:normal; word-wrap:normal"><span style="line-height:19px; word-break:normal; word-wrap:normal">、</span></span><span style="line-height:21px; font-family:&#39;DejaVu Serif Condensed&#39;,serif; word-break:normal; word-wrap:normal"><span style="line-height:19px; word-break:normal; word-wrap:normal"><span lang="en-US" style="word-break:normal; word-wrap:normal">QLinkedList</span></span></span><span style="line-height:21px; word-break:normal; word-wrap:normal"><span style="line-height:19px; word-break:normal; word-wrap:normal">及</span></span><span style="line-height:21px; font-family:&#39;DejaVu Serif Condensed&#39;,serif; word-break:normal; word-wrap:normal"><span style="line-height:19px; word-break:normal; word-wrap:normal"><span lang="en-US" style="word-break:normal; word-wrap:normal">QList</span></span></span><span style="line-height:21px; word-break:normal; word-wrap:normal"><span style="line-height:19px; word-break:normal; word-wrap:normal">的使用比較&#xff1a;</span></span></span></span></p> 
<ul type="disc" style="list-style-type:none; margin:0px; padding:0px; font-family:&#39;black Verdana&#39;,Arial,Helvetica,sans-serif; font-size:14px; line-height:21px; border-width:0px"><li><ul type="disc" style="list-style-type:none; margin:0px; padding:0px; border-width:0px"><li style="list-style:disc inherit inherit; margin:0px 0px 0px 30px; border-width:0px; padding:0px"> <p align="left" style="margin-top:0px; margin-bottom:0cm; border-width:0px; padding-top:0px; padding-bottom:0px; list-style-type:none; word-break:normal; word-wrap:normal"> <span style="font-family:永中宋体; word-break:normal; word-wrap:normal"><span style="line-height:19px; word-break:normal; word-wrap:normal">如果想要有連續鄰接的記憶體空間來存放元件&#xff0c;則使用</span></span><span style="font-family:&#39;DejaVu Serif Condensed&#39;,serif; word-break:normal; word-wrap:normal"><span style="line-height:19px; word-break:normal; word-wrap:normal"><span lang="en-US" style="word-break:normal; word-wrap:normal">QVector</span></span> </span><span style="font-family:永中宋体; word-break:normal; word-wrap:normal"><span style="line-height:19px; word-break:normal; word-wrap:normal">。</span></span></p> </li><li style="list-style:disc inherit inherit; margin:0px 0px 0px 30px; border-width:0px; padding:0px"> <p align="left" style="margin-top:0px; margin-bottom:0cm; border-width:0px; padding-top:0px; padding-bottom:0px; list-style-type:none; word-break:normal; word-wrap:normal"> <span style="font-family:永中宋体; word-break:normal; word-wrap:normal"><span style="line-height:19px; word-break:normal; word-wrap:normal">如果需要真正的鏈結資料結構&#xff0c;並使用基於迭代器的存取方式&#xff0c;則使用</span></span><span style="font-family:&#39;DejaVu Serif Condensed&#39;,serif; word-break:normal; word-wrap:normal"><span style="line-height:19px; word-break:normal; word-wrap:normal"><span lang="en-US" style="word-break:normal; word-wrap:normal">QLinkedList</span></span> </span><span style="font-family:永中宋体; word-break:normal; word-wrap:normal"><span style="line-height:19px; word-break:normal; word-wrap:normal">。</span></span></p> </li><li style="list-style:disc inherit inherit; margin:0px 0px 0px 30px; border-width:0px; padding:0px"> <p align="left" style="margin-top:0px; margin-bottom:5px; border-width:0px; padding-top:0px; padding-bottom:0px; list-style-type:none; word-break:normal; word-wrap:normal"> <span style="font-family:永中宋体; word-break:normal; word-wrap:normal"><span style="line-height:19px; word-break:normal; word-wrap:normal">在大部份情況下&#xff0c;</span></span><span style="font-family:&#39;DejaVu Serif Condensed&#39;,serif; word-break:normal; word-wrap:normal"><span style="line-height:19px; word-break:normal; word-wrap:normal"><span lang="en-US" style="word-break:normal; word-wrap:normal">QList</span></span> </span><span style="font-family:永中宋体; word-break:normal; word-wrap:normal"><span style="line-height:19px; word-break:normal; word-wrap:normal">可以滿足快速存取、插入、移除的需求&#xff0c;並可提供基於索引的存取方式。</span></span></p> </li></ul> 
</li></ul> 
<div class="cnblogs_Highlighter" style="word-wrap:break-word; font-family:&#39;black Verdana&#39;,Arial,Helvetica,sans-serif; font-size:14px; line-height:21px"> 
 <div style="word-wrap:break-word"> 
  <div id="highlighter_15733" class="syntaxhighlighter nogutter  csharp" style="word-wrap:break-word; width:1017px; margin:1em 0px!important; position:relative!important; overflow:auto!important; font-size:1em!important"> 
   <table border="0" cellpadding="0" cellspacing="0" style="border:1px solid silver; width:1017px; border-collapse:collapse; word-break:break-word; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.1em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; font-size:12px!important; min-height:inherit!important"><tbody style="border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.1em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; min-height:inherit!important"><tr style="border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.1em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; min-height:inherit!important"><td class="code" style="border:1px solid silver; padding:3px; border-collapse:collapse; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.1em!important; margin:0px!important; outline:0px!important; overflow:visible!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important"> 
       <div class="container" style="word-wrap:break-word; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.1em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:relative!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; min-height:inherit!important"> 
        <div class="line number1 index0 alt2" style="word-wrap:break-word; background-color:rgb(244,244,244)!important; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px 1em 0px 0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; min-height:inherit!important"> 
         <code class="csharp plain" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important">QList&lt;QString&gt; list; </code> 
        </div> 
        <div class="line number2 index1 alt1" style="word-wrap:break-word; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px 1em 0px 0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; min-height:inherit!important"> 
         <code class="csharp plain" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important">list &lt;&lt; </code> 
         <code class="csharp string" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important; color:blue!important">&#34;caterpillar&#34;</code>  
         <code class="csharp plain" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important">&lt;&lt; </code> 
         <code class="csharp string" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important; color:blue!important">&#34;momor&#34;</code>  
         <code class="csharp plain" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important">&lt;&lt; </code> 
         <code class="csharp string" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important; color:blue!important">&#34;bush&#34;</code> 
         <code class="csharp plain" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important">; </code> 
        </div> 
        <div class="line number3 index2 alt2" style="word-wrap:break-word; background-color:rgb(244,244,244)!important; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px 1em 0px 0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; min-height:inherit!important"> 
         <code class="csharp spaces" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important">    </code>  
        </div> 
        <div class="line number4 index3 alt1" style="word-wrap:break-word; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px 1em 0px 0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; min-height:inherit!important"> 
         <code class="csharp plain" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important">QListIterator&lt;QString&gt; iterator(list); </code> 
        </div> 
        <div class="line number5 index4 alt2" style="word-wrap:break-word; background-color:rgb(244,244,244)!important; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px 1em 0px 0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; min-height:inherit!important"> 
         <code class="csharp keyword" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important; color:rgb(0,0,255)!important">while</code>  
         <code class="csharp plain" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important">(iterator.hasNext()) { </code> 
        </div> 
        <div class="line number6 index5 alt1" style="word-wrap:break-word; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px 1em 0px 0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; min-height:inherit!important"> 
         <code class="csharp spaces" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important">    </code> 
         <code class="csharp plain" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important">cout &lt;&lt; iterator.next().toAscii().data() &lt;&lt; endl;</code> 
        </div> 
        <div class="line number7 index6 alt2" style="word-wrap:break-word; background-color:rgb(244,244,244)!important; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px 1em 0px 0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; min-height:inherit!important"> 
         <code class="csharp plain" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important">}</code> 
        </div> 
       </div> </td></tr></tbody></table> 
  </div> 
 </div> 
</div> 
<p style="margin:10px auto; font-family:&#39;black Verdana&#39;,Arial,Helvetica,sans-serif; font-size:14px; line-height:21px"> 　　<span style="font-family:永中宋体; word-break:normal; word-wrap:normal"><span style="line-height:19px; word-break:normal; word-wrap:normal">與</span></span><span style="font-family:&#39;DejaVu Serif Condensed&#39;,serif; word-break:normal; word-wrap:normal"><span style="line-height:19px; word-break:normal; word-wrap:normal"><span lang="en-US" style="word-break:normal; word-wrap:normal">Java</span></span></span> <span style="font-family:永中宋体; word-break:normal; word-wrap:normal"><span style="line-height:19px; word-break:normal; word-wrap:normal">迭代器類似的&#xff0c;</span></span><span style="font-family:&#39;DejaVu Serif Condensed&#39;,serif; word-break:normal; word-wrap:normal"><span style="line-height:19px; word-break:normal; word-wrap:normal"><span lang="en-US" style="word-break:normal; word-wrap:normal">hasNext()</span></span></span><span style="font-family:永中宋体; word-break:normal; word-wrap:normal"><span style="line-height:19px; word-break:normal; word-wrap:normal">測試是否有下一個元素&#xff0c;</span></span><span style="font-family:&#39;DejaVu Serif Condensed&#39;,serif; word-break:normal; word-wrap:normal"><span style="line-height:19px; word-break:normal; word-wrap:normal"><span lang="en-US" style="word-break:normal; word-wrap:normal">next()</span></span></span><span style="font-family:永中宋体; word-break:normal; word-wrap:normal"><span style="line-height:19px; word-break:normal; word-wrap:normal">傳回下一個元素&#xff0c;其它還有</span></span><span style="font-family:&#39;DejaVu Serif Condensed&#39;,serif; word-break:normal; word-wrap:normal"><span style="line-height:19px; word-break:normal; word-wrap:normal"><span lang="en-US" style="word-break:normal; word-wrap:normal">hasPrevious()</span></span></span><span style="font-family:永中宋体; word-break:normal; word-wrap:normal"><span style="line-height:19px; word-break:normal; word-wrap:normal">、</span></span><span style="font-family:&#39;DejaVu Serif Condensed&#39;,serif; word-break:normal; word-wrap:normal"><span style="line-height:19px; word-break:normal; word-wrap:normal"><span lang="en-US" style="word-break:normal; word-wrap:normal">previous()</span></span></span><span style="font-family:永中宋体; word-break:normal; word-wrap:normal"><span style="line-height:19px; word-break:normal; word-wrap:normal">等方法 可以使用。</span></span><span style="font-family:&#39;DejaVu Serif Condensed&#39;,serif; word-break:normal; word-wrap:normal"><span style="line-height:19px; word-break:normal; word-wrap:normal"><span lang="en-US" style="word-break:normal; word-wrap:normal">Java</span></span></span><span style="font-family:永中宋体; word-break:normal; word-wrap:normal"><span style="line-height:19px; word-break:normal; word-wrap:normal">風格的迭代器有兩種&#xff1a;唯讀與可讀寫。</span></span><span style="font-family:&#39;DejaVu Serif Condensed&#39;,serif; word-break:normal; word-wrap:normal"><span style="line-height:19px; word-break:normal; word-wrap:normal"><span lang="en-US" style="word-break:normal; word-wrap:normal">QListIterator</span></span></span><span style="font-family:永中宋体; word-break:normal; word-wrap:normal"><span style="line-height:19px; word-break:normal; word-wrap:normal">是唯讀迭代器&#xff0c;對於可讀寫迭代器&#xff0c;命名上會加上</span></span><span style="font-family:&#39;DejaVu Serif Condensed&#39;,serif; word-break:normal; word-wrap:normal"><span style="line-height:19px; word-break:normal; word-wrap:normal"><span lang="en-US" style="word-break:normal; word-wrap:normal">Mutable</span></span></span><span style="font-family:永中宋体; word-break:normal; word-wrap:normal"><span style="line-height:19px; word-break:normal; word-wrap:normal">&#xff0c;例 如</span></span><span style="font-family:&#39;DejaVu Serif Condensed&#39;,serif; word-break:normal; word-wrap:normal"><span style="line-height:19px; word-break:normal; word-wrap:normal"><span lang="en-US" style="word-break:normal; word-wrap:normal">QMutableListIterator</span></span></span><span style="font-family:永中宋体; word-break:normal; word-wrap:normal"><span style="line-height:19px; word-break:normal; word-wrap:normal">&#xff0c;除了</span></span><span style="font-family:&#39;DejaVu Serif Condensed&#39;,serif; word-break:normal; word-wrap:normal"><span style="line-height:19px; word-break:normal; word-wrap:normal"><span lang="en-US" style="word-break:normal; word-wrap:normal">next()</span></span></span><span style="font-family:永中宋体; word-break:normal; word-wrap:normal"><span style="line-height:19px; word-break:normal; word-wrap:normal">、</span></span><span style="font-family:&#39;DejaVu Serif Condensed&#39;,serif; word-break:normal; word-wrap:normal"><span style="line-height:19px; word-break:normal; word-wrap:normal"><span lang="en-US" style="word-break:normal; word-wrap:normal">previous()</span></span></span><span style="font-family:永中宋体; word-break:normal; word-wrap:normal"><span style="line-height:19px; word-break:normal; word-wrap:normal">等方法之外&#xff0c;還提供了</span></span><span style="font-family:&#39;DejaVu Serif Condensed&#39;,serif; word-break:normal; word-wrap:normal"><span style="line-height:19px; word-break:normal; word-wrap:normal"><span lang="en-US" style="word-break:normal; word-wrap:normal">insert()</span></span></span><span style="font-family:永中宋体; word-break:normal; word-wrap:normal"><span style="line-height:19px; word-break:normal; word-wrap:normal">、</span></span><span style="font-family:&#39;DejaVu Serif Condensed&#39;,serif; word-break:normal; word-wrap:normal"><span style="line-height:19px; word-break:normal; word-wrap:normal"><span lang="en-US" style="word-break:normal; word-wrap:normal">remove()</span></span></span><span style="font-family:永中宋体; word-break:normal; word-wrap:normal"><span style="line-height:19px; word-break:normal; word-wrap:normal">等方法可 以使用&#xff0c;例如&#xff1a;</span></span></p> 
<div class="cnblogs_Highlighter" style="word-wrap:break-word; font-family:&#39;black Verdana&#39;,Arial,Helvetica,sans-serif; font-size:14px; line-height:21px"> 
 <div style="word-wrap:break-word"> 
  <div id="highlighter_125838" class="syntaxhighlighter nogutter  csharp" style="word-wrap:break-word; width:1017px; margin:1em 0px!important; position:relative!important; overflow:auto!important; font-size:1em!important"> 
   <table border="0" cellpadding="0" cellspacing="0" style="border:1px solid silver; width:1017px; border-collapse:collapse; word-break:break-word; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.1em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; font-size:12px!important; min-height:inherit!important"><tbody style="border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.1em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; min-height:inherit!important"><tr style="border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.1em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; min-height:inherit!important"><td class="code" style="border:1px solid silver; padding:3px; border-collapse:collapse; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.1em!important; margin:0px!important; outline:0px!important; overflow:visible!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important"> 
       <div class="container" style="word-wrap:break-word; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.1em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:relative!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; min-height:inherit!important"> 
        <div class="line number1 index0 alt2" style="word-wrap:break-word; background-color:rgb(244,244,244)!important; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px 1em 0px 0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; min-height:inherit!important"> 
         <code class="csharp plain" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important">QLinkedList&lt;QString&gt; list;</code> 
        </div> 
        <div class="line number2 index1 alt1" style="word-wrap:break-word; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px 1em 0px 0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; min-height:inherit!important"> 
         <code class="csharp spaces" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important"> </code> 
         <code class="csharp plain" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important">list &lt;&lt; </code> 
         <code class="csharp string" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important; color:blue!important">&#34;caterpillar&#34;</code>  
         <code class="csharp plain" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important">&lt;&lt; </code> 
         <code class="csharp string" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important; color:blue!important">&#34;momor&#34;</code>  
         <code class="csharp plain" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important">&lt;&lt; </code> 
         <code class="csharp string" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important; color:blue!important">&#34;bush&#34;</code> 
         <code class="csharp plain" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important">;</code> 
        </div> 
        <div class="line number3 index2 alt2" style="word-wrap:break-word; background-color:rgb(244,244,244)!important; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px 1em 0px 0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; min-height:inherit!important"> 
         <code class="csharp spaces" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important"> </code> 
         <code class="csharp plain" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important">QMutableLinkedListIterator&lt;QString&gt; rwIterator(list); </code> 
        </div> 
        <div class="line number4 index3 alt1" style="word-wrap:break-word; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px 1em 0px 0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; min-height:inherit!important"> 
         <code class="csharp keyword" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important; color:rgb(0,0,255)!important">while</code>  
         <code class="csharp plain" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important">(rwIterator.hasNext())</code> 
        </div> 
        <div class="line number5 index4 alt2" style="word-wrap:break-word; background-color:rgb(244,244,244)!important; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px 1em 0px 0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; min-height:inherit!important"> 
         <code class="csharp spaces" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important"> </code> 
         <code class="csharp plain" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important">{<!-- --></code> 
        </div> 
        <div class="line number6 index5 alt1" style="word-wrap:break-word; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px 1em 0px 0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; min-height:inherit!important"> 
         <code class="csharp spaces" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important"> </code> 
         <code class="csharp keyword" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important; color:rgb(0,0,255)!important">if</code> 
         <code class="csharp plain" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important">(rwIterator.next() &#61;&#61; </code> 
         <code class="csharp string" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important; color:blue!important">&#34;momor&#34;</code> 
         <code class="csharp plain" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important">)</code> 
        </div> 
        <div class="line number7 index6 alt2" style="word-wrap:break-word; background-color:rgb(244,244,244)!important; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px 1em 0px 0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; min-height:inherit!important"> 
         <code class="csharp spaces" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important"> </code> 
         <code class="csharp plain" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important">{   rwIterator.insert(</code> 
         <code class="csharp string" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important; color:blue!important">&#34;bee&#34;</code> 
         <code class="csharp plain" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important">);  </code> 
        </div> 
        <div class="line number8 index7 alt1" style="word-wrap:break-word; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px 1em 0px 0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; min-height:inherit!important"> 
         <code class="csharp spaces" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important"> </code> 
         <code class="csharp keyword" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important; color:rgb(0,0,255)!important">break</code> 
         <code class="csharp plain" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important">; </code> 
        </div> 
        <div class="line number9 index8 alt2" style="word-wrap:break-word; background-color:rgb(244,244,244)!important; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px 1em 0px 0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; min-height:inherit!important"> 
         <code class="csharp plain" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important">}</code> 
        </div> 
        <div class="line number10 index9 alt1" style="word-wrap:break-word; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px 1em 0px 0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; min-height:inherit!important"> 
         <code class="csharp plain" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important">} </code> 
        </div> 
        <div class="line number11 index10 alt2" style="word-wrap:break-word; background-color:rgb(244,244,244)!important; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px 1em 0px 0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; min-height:inherit!important"> 
         <code class="csharp plain" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important">QLinkedListIterator&lt;QString&gt; rIterator(list); </code> 
        </div> 
        <div class="line number12 index11 alt1" style="word-wrap:break-word; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px 1em 0px 0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; min-height:inherit!important"> 
         <code class="csharp keyword" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important; color:rgb(0,0,255)!important">while</code>  
         <code class="csharp plain" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important">(</code> 
        </div> 
        <div class="line number13 index12 alt2" style="word-wrap:break-word; background-color:rgb(244,244,244)!important; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px 1em 0px 0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; min-height:inherit!important"> 
         <code class="csharp plain" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important">rIterator.hasNext()</code> 
        </div> 
        <div class="line number14 index13 alt1" style="word-wrap:break-word; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px 1em 0px 0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; min-height:inherit!important"> 
         <code class="csharp plain" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important">) </code> 
        </div> 
        <div class="line number15 index14 alt2" style="word-wrap:break-word; background-color:rgb(244,244,244)!important; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px 1em 0px 0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; min-height:inherit!important"> 
         <code class="csharp plain" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important">{ cout &lt;&lt; rIterator.next().toAscii().data() &lt;&lt; endl;</code> 
        </div> 
        <div class="line number16 index15 alt1" style="word-wrap:break-word; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px 1em 0px 0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; min-height:inherit!important"> 
         <code class="csharp plain" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important">}</code> 
        </div> 
       </div> </td></tr></tbody></table> 
  </div> 
 </div> 
</div> 
<p align="left" style="margin-top:0px; margin-bottom:5px; font-family:&#39;black Verdana&#39;,Arial,Helvetica,sans-serif; font-size:14px; line-height:21px; border-width:0px; padding-top:0px; padding-bottom:0px; list-style-type:none; word-break:normal; word-wrap:normal">  </p> 
<p style="margin:10px auto; font-family:&#39;black Verdana&#39;,Arial,Helvetica,sans-serif; font-size:14px; line-height:21px"> <strong><span style="color:rgb(0,0,128)">QMap</span></strong>是个有趣的东西&#xff0c;想在裸露的底层C&#43;&#43;实现它颇为麻烦。数组建立的是从0开始的连续数字与数据的对应关系&#xff0c;而QMap的作用就是&#xff0c;让任意一种数据类型对应于另一种数据类型。声明时如此&#xff1a;QMap&lt;索引类型,数据类型&gt; 变量名。他的表现有点类似于PHP编程的array</p> 
<p style="margin:10px auto; font-family:&#39;black Verdana&#39;,Arial,Helvetica,sans-serif; font-size:14px; line-height:21px"> 比如&#xff1a;</p> 
<div class="cnblogs_Highlighter" style="word-wrap:break-word; font-family:&#39;black Verdana&#39;,Arial,Helvetica,sans-serif; font-size:14px; line-height:21px"> 
 <div style="word-wrap:break-word"> 
  <div id="highlighter_116178" class="syntaxhighlighter nogutter  csharp" style="word-wrap:break-word; width:1017px; margin:1em 0px!important; position:relative!important; overflow:auto!important; font-size:1em!important"> 
   <table border="0" cellpadding="0" cellspacing="0" style="border:1px solid silver; width:1017px; border-collapse:collapse; word-break:break-word; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.1em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; font-size:12px!important; min-height:inherit!important"><tbody style="border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.1em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; min-height:inherit!important"><tr style="border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.1em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; min-height:inherit!important"><td class="code" style="border:1px solid silver; padding:3px; border-collapse:collapse; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.1em!important; margin:0px!important; outline:0px!important; overflow:visible!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important"> 
       <div class="container" style="word-wrap:break-word; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.1em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:relative!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; min-height:inherit!important"> 
        <div class="line number1 index0 alt2" style="word-wrap:break-word; background-color:rgb(244,244,244)!important; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px 1em 0px 0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; min-height:inherit!important"> 
         <code class="csharp preprocessor" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important; color:gray!important">#include&lt;QMap&gt;</code> 
        </div> 
        <div class="line number2 index1 alt1" style="word-wrap:break-word; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px 1em 0px 0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; min-height:inherit!important">
            
        </div> 
        <div class="line number3 index2 alt2" style="word-wrap:break-word; background-color:rgb(244,244,244)!important; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px 1em 0px 0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; min-height:inherit!important"> 
         <code class="csharp plain" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important">...</code> 
        </div> 
        <div class="line number4 index3 alt1" style="word-wrap:break-word; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px 1em 0px 0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; min-height:inherit!important">
            
        </div> 
        <div class="line number5 index4 alt2" style="word-wrap:break-word; background-color:rgb(244,244,244)!important; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px 1em 0px 0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; min-height:inherit!important"> 
         <code class="csharp keyword" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important; color:rgb(0,0,255)!important">void</code>  
         <code class="csharp plain" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important">someFunction()</code> 
        </div> 
        <div class="line number6 index5 alt1" style="word-wrap:break-word; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px 1em 0px 0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; min-height:inherit!important">
            
        </div> 
        <div class="line number7 index6 alt2" style="word-wrap:break-word; background-color:rgb(244,244,244)!important; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px 1em 0px 0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; min-height:inherit!important"> 
         <code class="csharp plain" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important">{<!-- --></code> 
        </div> 
        <div class="line number8 index7 alt1" style="word-wrap:break-word; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px 1em 0px 0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; min-height:inherit!important">
            
        </div> 
        <div class="line number9 index8 alt2" style="word-wrap:break-word; background-color:rgb(244,244,244)!important; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px 1em 0px 0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; min-height:inherit!important"> 
         <code class="csharp spaces" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important">    </code> 
         <code class="csharp plain" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important">QMap&lt;QString,QString&gt; map;</code> 
        </div> 
        <div class="line number10 index9 alt1" style="word-wrap:break-word; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px 1em 0px 0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; min-height:inherit!important">
            
        </div> 
        <div class="line number11 index10 alt2" style="word-wrap:break-word; background-color:rgb(244,244,244)!important; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px 1em 0px 0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; min-height:inherit!important"> 
         <code class="csharp spaces" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important">    </code> 
         <code class="csharp plain" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important">map[</code> 
         <code class="csharp string" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important; color:blue!important">&#34;Hello&#34;</code> 
         <code class="csharp plain" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important">]&#61;</code> 
         <code class="csharp string" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important; color:blue!important">&#34;World&#34;</code> 
         <code class="csharp plain" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important">;</code> 
        </div> 
        <div class="line number12 index11 alt1" style="word-wrap:break-word; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px 1em 0px 0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; min-height:inherit!important">
            
        </div> 
        <div class="line number13 index12 alt2" style="word-wrap:break-word; background-color:rgb(244,244,244)!important; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px 1em 0px 0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; min-height:inherit!important"> 
         <code class="csharp spaces" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important">    </code> 
         <code class="csharp plain" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important">QMap&lt;</code> 
         <code class="csharp keyword" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important; color:rgb(0,0,255)!important">int</code> 
         <code class="csharp plain" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important">,</code> 
         <code class="csharp keyword" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important; color:rgb(0,0,255)!important">double</code> 
         <code class="csharp plain" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important">&gt; i2d;</code> 
        </div> 
        <div class="line number14 index13 alt1" style="word-wrap:break-word; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px 1em 0px 0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; min-height:inherit!important">
            
        </div> 
        <div class="line number15 index14 alt2" style="word-wrap:break-word; background-color:rgb(244,244,244)!important; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px 1em 0px 0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; min-height:inherit!important"> 
         <code class="csharp spaces" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important">    </code> 
         <code class="csharp plain" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important">i2d[5231]&#61;32.4213;</code> 
        </div> 
        <div class="line number16 index15 alt1" style="word-wrap:break-word; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px 1em 0px 0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; min-height:inherit!important">
            
        </div> 
        <div class="line number17 index16 alt2" style="word-wrap:break-word; background-color:rgb(244,244,244)!important; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px 1em 0px 0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; min-height:inherit!important"> 
         <code class="csharp spaces" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important">    </code> 
         <code class="csharp comments" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important; color:rgb(0,130,0)!important">//遍历比较特殊&#xff0c;得这样&#xff1a;</code> 
        </div> 
        <div class="line number18 index17 alt1" style="word-wrap:break-word; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px 1em 0px 0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; min-height:inherit!important">
            
        </div> 
        <div class="line number19 index18 alt2" style="word-wrap:break-word; background-color:rgb(244,244,244)!important; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px 1em 0px 0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; min-height:inherit!important"> 
         <code class="csharp spaces" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important">    </code> 
         <code class="csharp plain" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important">QMapIterator&lt;QString,QString&gt; i(map);</code> 
        </div> 
        <div class="line number20 index19 alt1" style="word-wrap:break-word; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px 1em 0px 0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; min-height:inherit!important">
            
        </div> 
        <div class="line number21 index20 alt2" style="word-wrap:break-word; background-color:rgb(244,244,244)!important; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px 1em 0px 0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; min-height:inherit!important"> 
         <code class="csharp spaces" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important">    </code> 
         <code class="csharp keyword" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important; color:rgb(0,0,255)!important">while</code> 
         <code class="csharp plain" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important">(i.hasNext())</code> 
        </div> 
        <div class="line number22 index21 alt1" style="word-wrap:break-word; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px 1em 0px 0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; min-height:inherit!important">
            
        </div> 
        <div class="line number23 index22 alt2" style="word-wrap:break-word; background-color:rgb(244,244,244)!important; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px 1em 0px 0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; min-height:inherit!important"> 
         <code class="csharp spaces" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important">        </code> 
         <code class="csharp plain" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important">doSomething(i.next());</code> 
        </div> 
        <div class="line number24 index23 alt1" style="word-wrap:break-word; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px 1em 0px 0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; min-height:inherit!important">
            
        </div> 
        <div class="line number25 index24 alt2" style="word-wrap:break-word; background-color:rgb(244,244,244)!important; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px 1em 0px 0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; min-height:inherit!important"> 
         <code class="csharp plain" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important">}</code> 
        </div> 
       </div> </td></tr></tbody></table> 
  </div> 
 </div> 
</div> 
<p style="margin:10px auto; font-family:&#39;black Verdana&#39;,Arial,Helvetica,sans-serif; font-size:14px; line-height:21px"> 如果我们想用[]操作符访问某一项&#xff0c;但那一项并不存在&#xff0c;那就会自动创建&#xff0c;如果不想创建空白项可以使用value函数&#xff0c;如i2d.value(123,-0.1);这里如果i2d[123]存在的话就返回那一项&#xff0c;否则返回默认值-0.1&#xff0c;这个默认值可以不写&#xff0c;那样Qt系统就会使用Qt默认的默认值……。可以用take函数&#xff08;让人纠结的函数名&#xff09;来删除某一项。 </p> 
<p style="margin:10px auto; font-family:&#39;black Verdana&#39;,Arial,Helvetica,sans-serif; font-size:14px; line-height:21px"> <strong><span style="color:rgb(0,0,128)">QHash</span></strong>哈希表&#xff0c;与QMap几乎一样&#xff0c;但是它更高效&#xff0c;不过使用QHash要求作为索引的类型可以用&#61;&#61;比较并且有对应的函数qHash&#xff0c;Qt里面自带了一部分&#xff0c;比如QString、各类整数、指针、QByteArray、QChar等都可以直接作为QHash的索引。<span style="text-decoration:underline">因为QHash更高效&#xff0c;所以建议尽量使用QHash。</span> </p> 
<p style="margin:10px auto; font-family:&#39;black Verdana&#39;,Arial,Helvetica,sans-serif; font-size:14px; line-height:21px"> QMap与QHash都是一对一或多对以的映射&#xff0c;可以使用QMultiMap与QMultiHash建立一对多的映射。</p> 
<p style="margin:10px auto; font-family:&#39;black Verdana&#39;,Arial,Helvetica,sans-serif; font-size:14px; line-height:21px"> 比如QMultiMap &lt;int,QString&gt; map;</p> 
<p style="margin:10px auto; font-family:&#39;black Verdana&#39;,Arial,Helvetica,sans-serif; font-size:14px; line-height:21px"> map[3]&#61;&#34;Hello&#34;;</p> 
<p style="margin:10px auto; font-family:&#39;black Verdana&#39;,Arial,Helvetica,sans-serif; font-size:14px; line-height:21px"> map.insert(3,&#34;World&#34;);</p> 
<p style="margin:10px auto; font-family:&#39;black Verdana&#39;,Arial,Helvetica,sans-serif; font-size:14px; line-height:21px"> 调用map[3]时&#xff0c;就会得到一个QList&lt;QString&gt;类型的变量。</p> 
<p style="margin:10px auto; font-family:&#39;black Verdana&#39;,Arial,Helvetica,sans-serif; font-size:14px; line-height:21px"> 遍历时依然可用 QMapIterator</p> 
<p style="margin:10px auto; font-family:&#39;black Verdana&#39;,Arial,Helvetica,sans-serif; font-size:14px; line-height:21px">  </p> 
<p style="margin:10px auto; font-family:&#39;black Verdana&#39;,Arial,Helvetica,sans-serif; font-size:14px; line-height:21px"> 本文介绍的是<strong>Qt QHash </strong>和<strong>QMap</strong>的区别&#xff0c;关于容器类可以查阅更多的资料&#xff0c;首先我们先把<strong>QHash </strong>和<strong>QMap</strong>区分开来。内容如下。</p> 
<p style="margin:10px auto; font-family:&#39;black Verdana&#39;,Arial,Helvetica,sans-serif; font-size:14px; line-height:21px"> <strong>QMap</strong>提供了一个从类项为key的键到类项为T的直的映射&#xff0c;通常所存储的数据类型是一个键对应一个直&#xff0c;并且按照Key的次序存储数据&#xff0c;这个类也支持一键多值的情况&#xff0c;用类QMultiMap</p> 
<p style="margin:10px auto; font-family:&#39;black Verdana&#39;,Arial,Helvetica,sans-serif; font-size:14px; line-height:21px"> <strong>QHash</strong>具有和<strong>QMap</strong>几乎完全一样的APi&#xff0c;此类维护这一张哈希表&#xff0c;表的大小和数据项是自适应的&#xff0c;<strong>QHash</strong>是以任意的顺序住址他的数据&#xff0c;&#xff0c;当然了他也是可以支持一键多值的&#xff0c;QMultiHash</p> 
<p style="margin:10px auto; font-family:&#39;black Verdana&#39;,Arial,Helvetica,sans-serif; font-size:14px; line-height:21px"> <strong>两种之间的区别是&#xff1a;</strong></p> 
<p style="margin:10px auto; font-family:&#39;black Verdana&#39;,Arial,Helvetica,sans-serif; font-size:14px; line-height:21px"> QHash查找速度上显著于QMap</p> 
<p style="margin:10px auto; font-family:&#39;black Verdana&#39;,Arial,Helvetica,sans-serif; font-size:14px; line-height:21px"> QHash以任意的方式进行存储&#xff0c;而QMap则是以key顺序进行存储.</p> 
<p style="margin:10px auto; font-family:&#39;black Verdana&#39;,Arial,Helvetica,sans-serif; font-size:14px; line-height:21px"> Qhash 的键类型必须提供operator&#61;&#61;()和yige 全局的qHash(key)函数。而QMap的键类型key必须提供operator&lt;()函数.</p> 
<p style="margin:10px auto; font-family:&#39;black Verdana&#39;,Arial,Helvetica,sans-serif; font-size:14px; line-height:21px"> 他们同样也是有两种风格的迭代容器。用来进行遍历的。</p> 
<p style="margin:10px auto; font-family:&#39;black Verdana&#39;,Arial,Helvetica,sans-serif; font-size:14px; line-height:21px"> <strong>STL 风格的</strong></p> 
<p style="margin:10px auto; font-family:&#39;black Verdana&#39;,Arial,Helvetica,sans-serif; font-size:14px; line-height:21px"> QMap&lt;key,T&gt;  QMap&lt;key,T&gt;::const_iterator QMap&lt;key,T&gt;::iterator//同样中间那个也是只读的&#xff0c;最后那个是读写的。下面以一个例子来进行说明&#xff1a;</p> 
<div class="cnblogs_Highlighter" style="word-wrap:break-word; font-family:&#39;black Verdana&#39;,Arial,Helvetica,sans-serif; font-size:14px; line-height:21px"> 
 <div style="word-wrap:break-word"> 
  <div id="highlighter_651410" class="syntaxhighlighter nogutter  csharp" style="word-wrap:break-word; width:1017px; margin:1em 0px!important; position:relative!important; overflow:auto!important; font-size:1em!important"> 
   <table border="0" cellpadding="0" cellspacing="0" style="border:1px solid silver; width:1017px; border-collapse:collapse; word-break:break-word; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.1em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; font-size:12px!important; min-height:inherit!important"><tbody style="border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.1em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; min-height:inherit!important"><tr style="border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.1em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; min-height:inherit!important"><td class="code" style="border:1px solid silver; padding:3px; border-collapse:collapse; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.1em!important; margin:0px!important; outline:0px!important; overflow:visible!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important"> 
       <div class="container" style="word-wrap:break-word; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.1em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:relative!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; min-height:inherit!important"> 
        <div class="line number1 index0 alt2" style="word-wrap:break-word; background-color:rgb(244,244,244)!important; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px 1em 0px 0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; min-height:inherit!important"> 
         <code class="csharp plain" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important">1.#include &lt;QDebug&gt;</code> 
        </div> 
        <div class="line number2 index1 alt1" style="word-wrap:break-word; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px 1em 0px 0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; min-height:inherit!important"> 
         <code class="csharp plain" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important">2.</code> 
         <code class="csharp keyword" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important; color:rgb(0,0,255)!important">int</code>  
         <code class="csharp plain" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important">main(</code> 
         <code class="csharp keyword" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important; color:rgb(0,0,255)!important">int</code>  
         <code class="csharp plain" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important">argc, </code> 
         <code class="csharp keyword" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important; color:rgb(0,0,255)!important">char</code>  
         <code class="csharp plain" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important">*argv[]) </code> 
        </div> 
        <div class="line number3 index2 alt2" style="word-wrap:break-word; background-color:rgb(244,244,244)!important; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px 1em 0px 0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; min-height:inherit!important"> 
         <code class="csharp plain" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important">3.{ </code> 
        </div> 
        <div class="line number4 index3 alt1" style="word-wrap:break-word; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px 1em 0px 0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; min-height:inherit!important"> 
         <code class="csharp plain" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important">4. QMap&lt;QString, QString&gt; map; </code> 
        </div> 
        <div class="line number5 index4 alt2" style="word-wrap:break-word; background-color:rgb(244,244,244)!important; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px 1em 0px 0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; min-height:inherit!important"> 
         <code class="csharp plain" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important">5. map.insert(</code> 
         <code class="csharp string" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important; color:blue!important">&#34;beijing&#34;</code> 
         <code class="csharp plain" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important">, </code> 
         <code class="csharp string" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important; color:blue!important">&#34;111&#34;</code> 
         <code class="csharp plain" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important">); </code> 
        </div> 
        <div class="line number6 index5 alt1" style="word-wrap:break-word; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px 1em 0px 0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; min-height:inherit!important"> 
         <code class="csharp plain" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important">6. map.insert(</code> 
         <code class="csharp string" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important; color:blue!important">&#34;shanghai&#34;</code> 
         <code class="csharp plain" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important">, </code> 
         <code class="csharp string" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important; color:blue!important">&#34;021&#34;</code> 
         <code class="csharp plain" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important">); </code> 
        </div> 
        <div class="line number7 index6 alt2" style="word-wrap:break-word; background-color:rgb(244,244,244)!important; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px 1em 0px 0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; min-height:inherit!important"> 
         <code class="csharp plain" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important">7. map.insert(</code> 
         <code class="csharp string" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important; color:blue!important">&#34;tianjin&#34;</code> 
         <code class="csharp plain" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important">, </code> 
         <code class="csharp string" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important; color:blue!important">&#34;022&#34;</code> 
         <code class="csharp plain" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important">); </code> 
        </div> 
        <div class="line number8 index7 alt1" style="word-wrap:break-word; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px 1em 0px 0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; min-height:inherit!important"> 
         <code class="csharp plain" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important">8. map.insert(</code> 
         <code class="csharp string" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important; color:blue!important">&#34;chongqing&#34;</code> 
         <code class="csharp plain" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important">, </code> 
         <code class="csharp string" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important; color:blue!important">&#34;023&#34;</code> 
         <code class="csharp plain" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important">); </code> 
        </div> 
        <div class="line number9 index8 alt2" style="word-wrap:break-word; background-color:rgb(244,244,244)!important; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px 1em 0px 0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; min-height:inherit!important"> 
         <code class="csharp plain" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important">9. map.insert(</code> 
         <code class="csharp string" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important; color:blue!important">&#34;jinan&#34;</code> 
         <code class="csharp plain" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important">, </code> 
         <code class="csharp string" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important; color:blue!important">&#34;0531&#34;</code> 
         <code class="csharp plain" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important">); </code> 
        </div> 
        <div class="line number10 index9 alt1" style="word-wrap:break-word; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px 1em 0px 0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; min-height:inherit!important"> 
         <code class="csharp plain" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important">10. map.insert(</code> 
         <code class="csharp string" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important; color:blue!important">&#34;wuhan&#34;</code> 
         <code class="csharp plain" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important">, </code> 
         <code class="csharp string" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important; color:blue!important">&#34;027&#34;</code> 
         <code class="csharp plain" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important">); </code> 
        </div> 
        <div class="line number11 index10 alt2" style="word-wrap:break-word; background-color:rgb(244,244,244)!important; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px 1em 0px 0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; min-height:inherit!important"> 
         <code class="csharp plain" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important">11.QMap&lt;QString, QString&gt;::const_iterator i; </code> 
        </div> 
        <div class="line number12 index11 alt1" style="word-wrap:break-word; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px 1em 0px 0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; min-height:inherit!important"> 
         <code class="csharp plain" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important">12. </code> 
         <code class="csharp keyword" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important; color:rgb(0,0,255)!important">for</code> 
         <code class="csharp plain" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important">( i&#61;map.constBegin(); i!&#61;map.constEnd(); &#43;&#43;i) </code> 
        </div> 
        <div class="line number13 index12 alt2" style="word-wrap:break-word; background-color:rgb(244,244,244)!important; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px 1em 0px 0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; min-height:inherit!important"> 
         <code class="csharp plain" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important">13. qDebug() &lt;&lt;i.key() &lt;&lt;</code> 
         <code class="csharp string" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important; color:blue!important">&#34; &#34;</code>  
         <code class="csharp plain" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important">&lt;&lt;i.value(); </code> 
        </div> 
        <div class="line number14 index13 alt1" style="word-wrap:break-word; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px 1em 0px 0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; min-height:inherit!important"> 
         <code class="csharp plain" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important">14. QMap&lt;QString, QString&gt;::iterator mi; </code> 
        </div> 
        <div class="line number15 index14 alt2" style="word-wrap:break-word; background-color:rgb(244,244,244)!important; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px 1em 0px 0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; min-height:inherit!important"> 
         <code class="csharp plain" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important">15.mi &#61; map.find(</code> 
         <code class="csharp string" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important; color:blue!important">&#34;beijing&#34;</code> 
         <code class="csharp plain" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important">); </code> 
        </div> 
        <div class="line number16 index15 alt1" style="word-wrap:break-word; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px 1em 0px 0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; min-height:inherit!important"> 
         <code class="csharp plain" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important">16. </code> 
         <code class="csharp keyword" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important; color:rgb(0,0,255)!important">if</code> 
         <code class="csharp plain" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important">(mi !&#61; map.end()) </code> 
        </div> 
        <div class="line number17 index16 alt2" style="word-wrap:break-word; background-color:rgb(244,244,244)!important; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px 1em 0px 0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; min-height:inherit!important"> 
         <code class="csharp plain" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important">17. mi.value() &#61; </code> 
         <code class="csharp string" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important; color:blue!important">&#34;010&#34;</code> 
         <code class="csharp plain" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important">; </code> 
        </div> 
        <div class="line number18 index17 alt1" style="word-wrap:break-word; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px 1em 0px 0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; min-height:inherit!important"> 
         <code class="csharp plain" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important">18. QMap&lt;QString, QString&gt;::const_iterator modi; </code> 
        </div> 
        <div class="line number19 index18 alt2" style="word-wrap:break-word; background-color:rgb(244,244,244)!important; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px 1em 0px 0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; min-height:inherit!important"> 
         <code class="csharp plain" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important">19. qDebug() &lt;&lt; </code> 
         <code class="csharp string" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important; color:blue!important">&#34;&#34;</code> 
         <code class="csharp plain" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important">; </code> 
        </div> 
        <div class="line number20 index19 alt1" style="word-wrap:break-word; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px 1em 0px 0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; min-height:inherit!important"> 
         <code class="csharp plain" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important">20. </code> 
         <code class="csharp keyword" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important; color:rgb(0,0,255)!important">for</code> 
         <code class="csharp plain" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important">( modi&#61;map.constBegin(); modi!&#61;map.constEnd(); &#43;&#43;modi) </code> 
        </div> 
        <div class="line number21 index20 alt2" style="word-wrap:break-word; background-color:rgb(244,244,244)!important; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px 1em 0px 0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; min-height:inherit!important"> 
         <code class="csharp plain" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important">21. qDebug() &lt;&lt;modi.key() &lt;&lt;</code> 
         <code class="csharp string" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important; color:blue!important">&#34; &#34;</code>  
         <code class="csharp plain" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important">&lt;&lt;modi.value(); </code> 
        </div> 
        <div class="line number22 index21 alt1" style="word-wrap:break-word; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px 1em 0px 0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; min-height:inherit!important"> 
         <code class="csharp plain" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important">22. </code> 
         <code class="csharp keyword" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important; color:rgb(0,0,255)!important">return</code>  
         <code class="csharp plain" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important">0; </code> 
        </div> 
        <div class="line number23 index22 alt2" style="word-wrap:break-word; background-color:rgb(244,244,244)!important; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px 1em 0px 0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; min-height:inherit!important"> 
         <code class="csharp plain" style="white-space:pre-wrap; border:0px!important; bottom:auto!important; float:none!important; height:auto!important; left:auto!important; line-height:1.8em!important; margin:0px!important; outline:0px!important; overflow:visible!important; padding:0px!important; position:static!important; right:auto!important; top:auto!important; vertical-align:baseline!important; width:auto!important; font-family:Consolas,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,Courier,monospace!important; min-height:inherit!important">23.} </code> 
        </div> 
       </div> </td></tr></tbody></table> 
  </div> 
 </div> 
</div> 
<p style="margin:10px auto; font-family:&#39;black Verdana&#39;,Arial,Helvetica,sans-serif; font-size:14px; line-height:21px"> 　　小结&#xff1a;关于<strong>Qt</strong> 中<strong>QHash </strong>和<strong>QMap</strong>的区别&#xff0c;相信你看完之后&#xff0c;应该很了然一新了。如果你需要对内存分配做优化&#xff0c;<strong>Qt</strong>的容器提供了三大内存分配函数&#xff0c;reserve(size)&#xff0c;显示预分配size的内存; capacity()&#xff0c;返回已分配内存;squeeze()释放所有的未占用的内存;当你知道<strong>QHash</strong>的大小时&#xff0c;可以使用reserve函数预先分配内存。 </p> 
<p style="margin:10px auto; font-family:&#39;black Verdana&#39;,Arial,Helvetica,sans-serif; font-size:14px; line-height:21px"> 今天我们来说说Qt容器类中的关联存储容器。所谓关联存储容器&#xff0c;就是容器中存储的一般是二元组&#xff0c;而不是单个的对象。二元组一般表述为&#xff0c;也就是“键-值对”。</p> 
<p style="margin:10px auto; font-family:&#39;black Verdana&#39;,Arial,Helvetica,sans-serif; font-size:14px; line-height:21px"> 　　首先&#xff0c;我们看看数组的概念。数组可以看成是一种形式的键-值对&#xff0c;它的Key只能是int&#xff0c;而值的类型是Object&#xff0c;也就是任意类型(注意&#xff0c;这里我们只是说数组可以是任意类型&#xff0c;这个Object并不必须是一个对象)。现在我们扩展数组的概念&#xff0c;把Key也做成任意类型的&#xff0c;而不仅仅是int&#xff0c;这样就是一个关联容器了。如果学过数据结构&#xff0c;典型的关联容器就是散列(Hash Map&#xff0c;哈希表)。Qt提供两种关联容器类型&#xff1a;QMap和QHash。</p> 
<p style="margin:10px auto; font-family:&#39;black Verdana&#39;,Arial,Helvetica,sans-serif; font-size:14px; line-height:21px"> 　　QMap是一种键-值对的数据结构&#xff0c;它实际上使用跳表skip-list实现&#xff0c;按照K进行升序的方式进行存储。使用QMap的insert()函数可以向QMap中插入数据&#xff0c;典型的代码如下&#xff1a;</p> 
<table border="0" cellspacing="0" cellpadding="6" align="center" style="border:1px dotted rgb(204,204,204); border-collapse:collapse; word-break:break-word; color:rgb(0,0,0); font-family:&#39;black Verdana&#39;,Arial,Helvetica,sans-serif; font-size:14px; line-height:21px; width:965px; table-layout:fixed"><tbody><tr><td bgcolor="#f3f3f3" style="border:1px solid silver; border-collapse:collapse; padding:3px; word-wrap:break-word">   QMap map; <br /> 　　map.insert(&#34;eins&#34;, 1); 　　map.insert(&#34;sieben&#34;, 7); <br /> 　　map.insert(&#34;dreiundzwanzig&#34;, 23);</td></tr></tbody></table> 
<p style="margin:10px auto; font-family:&#39;black Verdana&#39;,Arial,Helvetica,sans-serif; font-size:14px; line-height:21px">  </p> 
<p style="margin:10px auto; font-family:&#39;black Verdana&#39;,Arial,Helvetica,sans-serif; font-size:14px; line-height:21px"> 　　同样&#xff0c;QMap也重载了[]运算符&#xff0c;你可以按照数组的复制方式进行使用&#xff1a;</p> 
<table border="0" cellspacing="0" cellpadding="6" align="center" style="border:1px dotted rgb(204,204,204); border-collapse:collapse; word-break:break-word; color:rgb(0,0,0); font-family:&#39;black Verdana&#39;,Arial,Helvetica,sans-serif; font-size:14px; line-height:21px; width:965px; table-layout:fixed"><tbody><tr><td bgcolor="#f3f3f3" style="border:1px solid silver; border-collapse:collapse; padding:3px; word-wrap:break-word">       map[&#34;eins&#34;] &#61; 1; <br /> 　　map[&#34;sieben&#34;] &#61; 7; <br /> 　　map[&#34;dreiundzwanzig&#34;] &#61; 23;</td></tr></tbody></table> 
<p style="margin:10px auto; font-family:&#39;black Verdana&#39;,Arial,Helvetica,sans-serif; font-size:14px; line-height:21px">  </p> 
<p style="margin:10px auto; font-family:&#39;black Verdana&#39;,Arial,Helvetica,sans-serif; font-size:14px; line-height:21px"> 　　[]操作符同样也可以像数组一样取值。但是请注意&#xff0c;如果在一个非const的map中&#xff0c;使用[]操作符取一个不存在的Key的值&#xff0c;则这个Key会被自动创建&#xff0c;并将其关联的value赋予一个空值。如果要避免这种情况&#xff0c;请使用QMap的value()函数&#xff1a;</p> 
<table border="0" cellspacing="0" cellpadding="6" align="center" style="border:1px dotted rgb(204,204,204); border-collapse:collapse; word-break:break-word; color:rgb(0,0,0); font-family:&#39;black Verdana&#39;,Arial,Helvetica,sans-serif; font-size:14px; line-height:21px; width:965px; table-layout:fixed"><tbody><tr><td bgcolor="#f3f3f3" style="border:1px solid silver; border-collapse:collapse; padding:3px; word-wrap:break-word"> int val &#61; map.value(&#34;dreiundzwanzig&#34;);</td></tr></tbody></table> 
<p style="margin:10px auto; font-family:&#39;black Verdana&#39;,Arial,Helvetica,sans-serif; font-size:14px; line-height:21px">  </p> 
<p style="margin:10px auto; font-family:&#39;black Verdana&#39;,Arial,Helvetica,sans-serif; font-size:14px; line-height:21px"> 　　如果key不存在&#xff0c;基本类型和指针会返回0&#xff0c;对象类型则会调用默认构造函数&#xff0c;返回一个对象&#xff0c;与[]操作符不同的是&#xff0c;value()函数不会创建一个新的键-值对。如果你希望让不存在的键返回一个默认值&#xff0c;可以传给value()函数第二个参数&#xff1a;</p> 
<table border="0" cellspacing="0" cellpadding="6" align="center" style="border:1px dotted rgb(204,204,204); border-collapse:collapse; word-break:break-word; color:rgb(0,0,0); font-family:&#39;black Verdana&#39;,Arial,Helvetica,sans-serif; font-size:14px; line-height:21px; width:965px; table-layout:fixed"><tbody><tr><td bgcolor="#f3f3f3" style="border:1px solid silver; border-collapse:collapse; padding:3px; word-wrap:break-word"> int seconds &#61; map.value(&#34;delay&#34;, 30);</td></tr></tbody></table> 
<p style="margin:10px auto; font-family:&#39;black Verdana&#39;,Arial,Helvetica,sans-serif; font-size:14px; line-height:21px">  </p> 
<p style="margin:10px auto; font-family:&#39;black Verdana&#39;,Arial,Helvetica,sans-serif; font-size:14px; line-height:21px"> 　　这行代码等价于&#xff1a;</p> 
<table border="0" cellspacing="0" cellpadding="6" align="center" style="border:1px dotted rgb(204,204,204); border-collapse:collapse; word-break:break-word; color:rgb(0,0,0); font-family:&#39;black Verdana&#39;,Arial,Helvetica,sans-serif; font-size:14px; line-height:21px; width:965px; table-layout:fixed"><tbody><tr><td bgcolor="#f3f3f3" style="border:1px solid silver; border-collapse:collapse; padding:3px; word-wrap:break-word">       int seconds &#61; 30; <br /> 　　if (map.contains(&#34;delay&#34;)) <br /> 　　seconds &#61; map.value(&#34;delay&#34;);</td></tr></tbody></table> 
<p style="margin:10px auto; font-family:&#39;black Verdana&#39;,Arial,Helvetica,sans-serif; font-size:14px; line-height:21px">  </p> 
<p style="margin:10px auto; font-family:&#39;black Verdana&#39;,Arial,Helvetica,sans-serif; font-size:14px; line-height:21px"> 　　QMap中的K和T可以是基本数据类型&#xff0c;如int&#xff0c;double&#xff0c;可以是指针&#xff0c;或者是拥有默认构造函数、拷贝构造函数和赋值运算符的类。并且K必须要重载&lt;运算符&#xff0c;因为QMap需要按K升序进行排序。</p> 
<p style="margin:10px auto; font-family:&#39;black Verdana&#39;,Arial,Helvetica,sans-serif; font-size:14px; line-height:21px"> 　　QMap提供了keys()和values()函数&#xff0c;可以获得键的集合和值的集合。这两个集合都是使用QList作为返回值的。</p> 
<p style="margin:10px auto; font-family:&#39;black Verdana&#39;,Arial,Helvetica,sans-serif; font-size:14px; line-height:21px"> 　　Map是单值类型的&#xff0c;也就是说&#xff0c;如果一个新的值分配给一个已存在的键&#xff0c;则旧值会被覆盖。如果你需要让一个key可以索引多个值&#xff0c;可以使用QMultiMap。这个类允许一个key索引多个value&#xff0c;如&#xff1a;</p> 
<table border="0" cellspacing="0" cellpadding="6" align="center" style="border:1px dotted rgb(204,204,204); border-collapse:collapse; word-break:break-word; color:rgb(0,0,0); font-family:&#39;black Verdana&#39;,Arial,Helvetica,sans-serif; font-size:14px; line-height:21px; width:965px; table-layout:fixed"><tbody><tr><td bgcolor="#f3f3f3" style="border:1px solid silver; border-collapse:collapse; padding:3px; word-wrap:break-word">   　QMultiMap multiMap; <br /> 　　multiMap.insert(1, &#34;one&#34;); 　　multiMap.insert(1, &#34;eins&#34;); <br /> 　　multiMap.insert(1, &#34;uno&#34;); 　　 <br /> 　　QList vals &#61; multiMap.values(1);</td></tr></tbody></table> 
<p style="margin:10px auto; font-family:&#39;black Verdana&#39;,Arial,Helvetica,sans-serif; font-size:14px; line-height:21px">  </p> 
<p style="margin:10px auto; font-family:&#39;black Verdana&#39;,Arial,Helvetica,sans-serif; font-size:14px; line-height:21px"> 　　QHash是使用散列存储的键-值对。它的接口同QMap几乎一样&#xff0c;但是它们两个的实现需求不同。QHash的查找速度比QMap快很多&#xff0c;并且它的存储是不排序的。对于QHash而言&#xff0c;K的类型必须重载了&#61;&#61;操作符&#xff0c;并且必须被全局函数qHash()所支持&#xff0c;这个函数用于返回key的散列值。Qt已经为int、指针、QChar、QString和QByteArray实现了qHash()函数。</p> 
<p style="margin:10px auto; font-family:&#39;black Verdana&#39;,Arial,Helvetica,sans-serif; font-size:14px; line-height:21px"> 　　QHash会自动地为散列分配一个初始大小&#xff0c;并且在插入数据或者删除数据的时候改变散列的大小。我们可以使用reserve()函数扩大散列&#xff0c;使用squeeze()函数将散列缩小到最小大小(这个最小大小实际上是能够存储这些数据的最小空间)。在使用时&#xff0c;我们可以使用reserve()函数将数据项扩大到我们所期望的最大值&#xff0c;然后插入数据&#xff0c;完成之后使用squeeze()函数收缩空间。</p> 
<p style="margin:10px auto; font-family:&#39;black Verdana&#39;,Arial,Helvetica,sans-serif; font-size:14px; line-height:21px"> 　　QHash同样也是单值类型的&#xff0c;但是你可以使用insertMulti()函数&#xff0c;或者是使用QMultiHash类来为一个键插入多个值。另外&#xff0c;除了QHash&#xff0c;Qt也提供了QCache来提供缓存&#xff0c;QSet用于仅存储key的情况。这两个类同QHash一样具有K的类型限制。</p> 
<p style="margin:10px auto; font-family:&#39;black Verdana&#39;,Arial,Helvetica,sans-serif; font-size:14px; line-height:21px"> 　　遍历关联存储容器的最简单的办法是使用Java风格的遍历器。因为Java风格的遍历器的next()和previous()函数可以返回一个键-值对&#xff0c;而不仅仅是值&#xff0c;例如&#xff1a;</p> 
<table border="0" cellspacing="0" cellpadding="6" align="center" style="border:1px dotted rgb(204,204,204); border-collapse:collapse; word-break:break-word; color:rgb(0,0,0); font-family:&#39;black Verdana&#39;,Arial,Helvetica,sans-serif; font-size:14px; line-height:21px; width:965px; table-layout:fixed"><tbody><tr><td bgcolor="#f3f3f3" style="border:1px solid silver; border-collapse:collapse; padding:3px; word-wrap:break-word">       QMap map; 　　... <br /> 　　int sum &#61; 0; 　　QMapIterator i(map); 　　while (i.hasNext()) <br /> 　　 sum &#43;&#61; i.next().value();</td></tr></tbody></table> 
<p style="margin:10px auto; font-family:&#39;black Verdana&#39;,Arial,Helvetica,sans-serif; font-size:14px; line-height:21px">  </p> 
<p style="margin:10px auto; font-family:&#39;black Verdana&#39;,Arial,Helvetica,sans-serif; font-size:14px; line-height:21px"> 　　如果我们并不需要访问键-值对&#xff0c;可以直接忽略next()和previous()函数的返回值&#xff0c;而是调用key()和value()函数即可&#xff0c;如&#xff1a;</p> 
<table border="0" cellspacing="0" cellpadding="6" align="center" style="border:1px dotted rgb(204,204,204); border-collapse:collapse; word-break:break-word; color:rgb(0,0,0); font-family:&#39;black Verdana&#39;,Arial,Helvetica,sans-serif; font-size:14px; line-height:21px; width:965px; table-layout:fixed"><tbody><tr><td bgcolor="#f3f3f3" style="border:1px solid silver; border-collapse:collapse; padding:3px; word-wrap:break-word"> QMapIterator i(map); <br /> 　　while (i.hasNext()) { 　　 i.next(); <br /> 　　 if (i.value() &gt; largestValue) { 　　 largestKey &#61; i.key(); <br /> 　　 largestValue &#61; i.value(); 　　 } 　　}</td></tr></tbody></table> 
<p style="margin:10px auto; font-family:&#39;black Verdana&#39;,Arial,Helvetica,sans-serif; font-size:14px; line-height:21px">  </p> 
<p style="margin:10px auto; font-family:&#39;black Verdana&#39;,Arial,Helvetica,sans-serif; font-size:14px; line-height:21px"> 　　Mutable遍历器则可以修改key对应的值&#xff1a;</p> 
<table border="0" cellspacing="0" cellpadding="6" align="center" style="border:1px dotted rgb(204,204,204); border-collapse:collapse; word-break:break-word; color:rgb(0,0,0); font-family:&#39;black Verdana&#39;,Arial,Helvetica,sans-serif; font-size:14px; line-height:21px; width:965px; table-layout:fixed"><tbody><tr><td bgcolor="#f3f3f3" style="border:1px solid silver; border-collapse:collapse; padding:3px; word-wrap:break-word"> QMutableMapIterator i(map); <br /> 　　while (i.hasNext()) { 　　 i.next(); 　　 if (i.value() &lt; 0.0) <br /> 　　 i.setValue(-i.value()); 　　}</td></tr></tbody></table> 
<p style="margin:10px auto; font-family:&#39;black Verdana&#39;,Arial,Helvetica,sans-serif; font-size:14px; line-height:21px">  </p> 
<p style="margin:10px auto; font-family:&#39;black Verdana&#39;,Arial,Helvetica,sans-serif; font-size:14px; line-height:21px"> 　　如果是STL风格的遍历器&#xff0c;则可以使用它的key()和value()函数。而对于foreach循环&#xff0c;我们就需要分别对key和value进行循环了&#xff1a;</p> 
<table border="0" cellspacing="0" cellpadding="6" align="center" style="border:1px dotted rgb(204,204,204); border-collapse:collapse; word-break:break-word; color:rgb(0,0,0); font-family:&#39;black Verdana&#39;,Arial,Helvetica,sans-serif; font-size:14px; line-height:21px; width:965px; table-layout:fixed"><tbody><tr><td bgcolor="#f3f3f3" style="border:1px solid silver; border-collapse:collapse; padding:3px; word-wrap:break-word"> QMultiMap map; 　　... <br /> 　　foreach (QString key, map.keys()) { <br /> 　　 foreach (int value, map.values(key)) { 　　 doSomething(key, value); <br /> 　　 } 　　}</td></tr></tbody></table>
                </div>
        </div>
    </article>
  <script>
    $(function() {
      setTimeout(function () {
        var mathcodeList = document.querySelectorAll('.htmledit_views img.mathcode');
        if (mathcodeList.length > 0) {
          for (let i = 0; i < mathcodeList.length; i++) {
            if (mathcodeList[i].complete) {
              if (mathcodeList[i].naturalWidth === 0 || mathcodeList[i].naturalHeight === 0) {
                var alt = mathcodeList[i].alt;
                alt = '\\(' + alt + '\\)';
                var curSpan = $('<span class="img-codecogs"></span>');
                curSpan.text(alt);
                $(mathcodeList[i]).before(curSpan);
                $(mathcodeList[i]).remove();
              }
            } else {
              mathcodeList[i].onerror = function() {
                var alt = mathcodeList[i].alt;
                alt = '\\(' + alt + '\\)';
                var curSpan = $('<span class="img-codecogs"></span>');
                curSpan.text(alt);
                $(mathcodeList[i]).before(curSpan);
                $(mathcodeList[i]).remove();
              };
            }
          }
          MathJax.Hub.Queue(["Typeset",MathJax.Hub]);
        }
      }, 500)
    });
  </script>
</div>
<div class="directory-boxshadow-dialog" style="display:none;">
  <div class="directory-boxshadow-dialog-box">
  </div>
   <div class="vip-limited-time-offer-box-new" id="vip-limited-time-offer-box-new">
      <img class="limited-img limited-img-new" src="https://csdnimg.cn/release/blogv2/dist/pc/img/vip-limited-close-newWhite.png">
      <div class="vip-limited-time-top">
        确定要放弃本次机会？
      </div>
      <span class="vip-limited-time-text">福利倒计时</span>
      <div class="limited-time-box-new">
        <span class="time-hour"></span>
        <i>:</i>
        <span class="time-minite"></span>
        <i>:</i>
        <span class="time-second"></span>
      </div>
      <div class="limited-time-vip-box">
        <p>
          <img class="coupon-img" src="https://csdnimg.cn/release/blogv2/dist/pc/img/vip-limited-close-roup.png">
          <span class="def">立减 ¥</span>
          <span class="active limited-num"></span>
        </p>
        <span class="">普通VIP年卡可用</span>
      </div>
      <a class="limited-time-btn-new" href="https://mall.csdn.net/vip" data-report-click='{"spm":"1001.2101.3001.9621"}' data-report-query='spm=1001.2101.3001.9621'>立即使用</a>
  </div>
</div>    <div class="more-toolbox-new more-toolbar" id="toolBarBox">
      <div class="left-toolbox">
        <div class="toolbox-left">
            <div class="profile-box">
              <a class="profile-href" target="_blank" href="https://blog.csdn.net/senkkes"><img class="profile-img" src="https://profile-avatar.csdnimg.cn/3e35cd7496874e929dd848d757703318_senkkes.jpg!1">
                <span class="profile-name">
                  senkkes
                </span>
              </a>
            </div>
            <div class="profile-attend">
                <a class="tool-attend tool-bt-button tool-bt-attend" href="javascript:;" data-report-view='{"mod":"1592215036_002","spm":"1001.2101.3001.4232","extend1":"关注"}'>关注</a>
              <a class="tool-item-follow active-animation" style="display:none;">关注</a>
            </div>
        </div>
        <div class="toolbox-middle">
          <ul class="toolbox-list">
            <li class="tool-item tool-item-size tool-active is-like" id="is-like">
              <a class="tool-item-href">
                <img style="display:none;" id="is-like-imgactive-animation-like" class="animation-dom active-animation" src="https://csdnimg.cn/release/blogv2/dist/pc/img/tobarThumbUpactive.png" alt="">
                <img class="isactive" style="display:none" id="is-like-imgactive" src="https://csdnimg.cn/release/blogv2/dist/pc/img/toolbar/like-active.png" alt="">
                <img class="isdefault" style="display:block" id="is-like-img" src="https://csdnimg.cn/release/blogv2/dist/pc/img/toolbar/like.png" alt="">
                <span id="spanCount" class="count ">
                      0
                </span>
              </a>
              <div class="tool-hover-tip"><span class="text space">点赞</span></div>
            </li>
            <li class="tool-item tool-item-size tool-active is-unlike" id="is-unlike">
              <a class="tool-item-href">
                <img class="isactive" style="margin-right:0px;display:none" id="is-unlike-imgactive" src="https://csdnimg.cn/release/blogv2/dist/pc/img/toolbar/unlike-active.png" alt="">
                <img class="isdefault" style="margin-right:0px;display:block" id="is-unlike-img" src="https://csdnimg.cn/release/blogv2/dist/pc/img/toolbar/unlike.png" alt="">
                <span id="unlikeCount" class="count "></span>
              </a>
              <div class="tool-hover-tip"><span class="text space">踩</span></div>
            </li>
            <li class="tool-item tool-item-size tool-active is-collection ">
              <a class="tool-item-href" href="javascript:;" data-report-click='{"mod":"popu_824","spm":"1001.2101.3001.4130","ab":"new"}'>
                <img style="display:none" id="is-collection-img-collection" class="animation-dom active-animation" src="https://csdnimg.cn/release/blogv2/dist/pc/img/toolbar/collect-active.png" alt="">
                <img class="isdefault" id="is-collection-img" style="display:block" src="https://csdnimg.cn/release/blogv2/dist/pc/img/toolbar/collect.png" alt="">
                <img class="isactive" id="is-collection-imgactive" style="display:none" src="https://csdnimg.cn/release/blogv2/dist/pc/img/newCollectActive.png" alt="">
                <span class="count get-collection " data-num="4" id="get-collection">
                    4
                </span>
              </a>
              <div class="tool-hover-tip collect">
                <div class="collect-operate-box">
                  <span class="collect-text" id="is-collection">
                    收藏
                  </span>
                </div>
              </div>
              <div class="tool-active-list">
                <div class="text">
                  觉得还不错?
                  <span class="collect-text" id="tool-active-list-collection">
                    一键收藏
                  </span>
                 <img id="tool-active-list-close" src="https://csdnimg.cn/release/blogv2/dist/pc/img/collectionCloseWhite.png" alt="">
                </div>
              </div>
            </li>
            <li class="tool-item tool-item-size tool-active tool-item-comment">
              <div class="guide-rr-first">
                <img src="https://csdnimg.cn/release/blogv2/dist/pc/img/guideRedReward01.png" alt="">
                <button class="btn-guide-known">知道了</button>
              </div>
                <a class="tool-item-href go-side-comment" data-report-click='{"spm":"1001.2101.3001.7009"}'>
                <img class="isdefault" src="https://csdnimg.cn/release/blogv2/dist/pc/img/toolbar/comment.png" alt="">
                <span class="count">
                      0
                </span>
              </a>
              <div class="tool-hover-tip"><span class="text space">评论</span></div>
            </li>
            <li class="tool-item tool-item-size tool-active tool-QRcode" data-type="article" id="tool-share">
              <a class="tool-item-href" href="javascript:;" data-report-view='{"spm":"3001.4129","extra":{"type":"blogdetail"}}'>
                <img class="isdefault" src="https://csdnimg.cn/release/blogv2/dist/pc/img/toolbar/share.png" alt="">
                <span class="count">分享</span>
              </a>
                <div class="QRcode" id="tool-QRcode">
                <div class="share-bg-box">
                  <div class="share-content">
                    <a id="copyPosterUrl" data-type="link" class="btn-share">复制链接</a>
                  </div>
                  <div class="share-content">
                    <a class="btn-share" data-type="qq">分享到 QQ</a>
                  </div>
                  <div class="share-content">
                    <a class="btn-share" data-type="weibo">分享到新浪微博</a>
                  </div>
                  <div class="share-code">
                    <div class="share-code-box" id='shareCode'></div>
                    <div class="share-code-text">
                      <img src="https://csdnimg.cn/release/blogv2/dist/pc/img/share/icon-wechat.png" alt="">扫一扫
                    </div>
                  </div>
                </div>
              </div>
            </li>
          <li class="tool-item tool-item-size tool-active is-more" id="is-more">
            <a class="tool-item-href">
              <img class="isdefault" style="margin-right:0px;display:block" src="https://csdnimg.cn/release/blogv2/dist/pc/img/toolbar/more.png" alt="">
              <span class="count"></span>
            </a>
            <div class="more-opt-box">
              <div class="mini-box">
                <a class="tool-item-href" id="toolReportBtnHide">
                  <img class="isdefault" src="https://csdnimg.cn/release/blogv2/dist/pc/img/toolbar/report.png" alt="">
                  <span class="count">举报</span>
                </a>
              </div>
              <div class="normal-box">
                <a class="tool-item-href" id="toolReportBtnHideNormal">
                  <img class="isdefault" src="https://csdnimg.cn/release/blogv2/dist/pc/img/toolbar/report.png" alt="">
                  <span class="count">举报</span>
                </a>
              </div>
            </div>
          </li>
        </ul>
      </div>
      <div class="toolbox-right">
</div>
</div>
</div>
<script type=text/javascript crossorigin src="https://csdnimg.cn/release/phoenix/production/qrcode-7c90a92189.min.js"></script>
<script type="text/javascript" crossorigin src="https://g.csdnimg.cn/common/csdn-login-box/csdn-login-box.js"></script>
<script type="text/javascript" crossorigin src="https://g.csdnimg.cn/collection-box/2.1.2/collection-box.js"></script>              <div id="dmp_ad_58" style="width:100%;overflow-x:hidden">
                <div id="kp_box_58" data-pid="58"><iframe  src="https://kunpeng-sc.csdnimg.cn/?timestamp=1645783940/#/preview/1843259?positionId=58&adBlockFlag=0&adId=1063998&queryWord=Qt中丰富的容器类---数组QVector、链表QLinkedList、映射表QMap、哈希表QHash&spm=1001.2101.3001.5002&articleId=49804747" frameborder="0" width= "100%"  height= "75px" scrolling="no" ></iframe><img class="pre-img-lasy"  data-src="https://kunyu.csdn.net/1.png?p=58&adBlockFlag=0&adId=1063998&a=1063998&c=1843259&k=Qt中丰富的容器类---数组QVector、链表QLinkedList、映射表QMap、哈希表QHash&spm=1001.2101.3001.5002&articleId=49804747&d=1&t=3&u=0075495884724e4e896a1d87e5b13fa3" style="display: block;width: 0px;height: 0px;"></div>
              </div>
            <script src="https://csdnimg.cn/release/blogv2/dist/components/js/pc_wap_commontools-36438a370e.min.js" type="text/javascript" async></script>
              <div class="second-recommend-box recommend-box ">
<div class="recommend-item-box type_download clearfix" data-url="https://download.csdn.net/download/qq_24052925/10590132"  data-report-view='{"ab":"new","spm":"1001.2101.3001.6650.1","mod":"popu_387","extra":"{\"highlightScore\":0.0,\"utm_medium\":\"distribute.pc_relevant.none-task-download-2~default~BlogCommendFromBaidu~Rate-1-10590132-blog-49804747.235^v43^pc_blog_bottom_relevance_base7\",\"dist_request_id\":\"1733930486580_55075\"}","dist_request_id":"1733930486580_55075","ab_strategy":"landingbge_opensearch_vector_rrf_v2","index":"1","strategy":"2~default~BlogCommendFromBaidu~Rate","dest":"https://download.csdn.net/download/qq_24052925/10590132"}'>
	<div class="content-box">
		<div class="content-blog display-flex">
			<div class="title-box">
				<a href="https://download.csdn.net/download/qq_24052925/10590132" class="tit" target="_blank"  data-report-click='{"ab":"new","spm":"1001.2101.3001.6650.1","mod":"popu_387","extra":"{\"highlightScore\":0.0,\"utm_medium\":\"distribute.pc_relevant.none-task-download-2~default~BlogCommendFromBaidu~Rate-1-10590132-blog-49804747.235^v43^pc_blog_bottom_relevance_base7\",\"dist_request_id\":\"1733930486580_55075\"}","dist_request_id":"1733930486580_55075","ab_strategy":"landingbge_opensearch_vector_rrf_v2","index":"1","strategy":"2~default~BlogCommendFromBaidu~Rate","dest":"https://download.csdn.net/download/qq_24052925/10590132"}'  data-report-query='spm=1001.2101.3001.6650.1&utm_medium=distribute.pc_relevant.none-task-download-2%7Edefault%7EBlogCommendFromBaidu%7ERate-1-10590132-blog-49804747.235%5Ev43%5Epc_blog_bottom_relevance_base7&depth_1-utm_source=distribute.pc_relevant.none-task-download-2%7Edefault%7EBlogCommendFromBaidu%7ERate-1-10590132-blog-49804747.235%5Ev43%5Epc_blog_bottom_relevance_base7'>
					<div class="left ellipsis-online ellipsis-online-1"><em>QT</em>控件<em>数组</em>创建的一种方法</div>
				</a>
			</div>
			<div class="info-box display-flex">
				<div class="info display-flex">
					<span class="info-block">08-08</span>
				</div>
			</div>
		</div>
		<div class="desc-box">
			<a href="https://download.csdn.net/download/qq_24052925/10590132" target="_blank"  data-report-click='{"ab":"new","spm":"1001.2101.3001.6650.1","mod":"popu_387","extra":"{\"highlightScore\":0.0,\"utm_medium\":\"distribute.pc_relevant.none-task-download-2~default~BlogCommendFromBaidu~Rate-1-10590132-blog-49804747.235^v43^pc_blog_bottom_relevance_base7\",\"dist_request_id\":\"1733930486580_55075\"}","dist_request_id":"1733930486580_55075","ab_strategy":"landingbge_opensearch_vector_rrf_v2","index":"1","strategy":"2~default~BlogCommendFromBaidu~Rate","dest":"https://download.csdn.net/download/qq_24052925/10590132"}'  data-report-query='spm=1001.2101.3001.6650.1&utm_medium=distribute.pc_relevant.none-task-download-2%7Edefault%7EBlogCommendFromBaidu%7ERate-1-10590132-blog-49804747.235%5Ev43%5Epc_blog_bottom_relevance_base7&depth_1-utm_source=distribute.pc_relevant.none-task-download-2%7Edefault%7EBlogCommendFromBaidu%7ERate-1-10590132-blog-49804747.235%5Ev43%5Epc_blog_bottom_relevance_base7'>
				<div class="desc ellipsis-online ellipsis-online-1">使用<em>QT</em>for语句创建控件<em>数组</em>（button[i]），方便大量控件调用，本程序以Qpushbutton为例，语言简洁</div>
			</a>
		</div>
	</div>
</div>
              </div>
<a id="commentBox" name="commentBox"></a>
  <div id="pcCommentBox" class="comment-box comment-box-new2 login-comment-box-new" style="display:none">
      <div class="has-comment" style="display:block">
        <div class="one-line-box">
          <div class="has-comment-tit go-side-comment">
            <span class="count">0</span>&nbsp;条评论
          </div>
          <div class="has-comment-con comment-operate-item"></div>
          <a class="has-comment-bt-right go-side-comment focus">写评论</a>
        </div>
      </div>
  </div>
              <div class="recommend-box insert-baidu-box recommend-box-style ">
                <div class="recommend-item-box no-index" style="display:none"></div>
<div class="recommend-item-box type_blog clearfix" data-url="https://devpress.csdn.net/v1/article/detail/142966027"  data-report-view='{"ab":"new","spm":"1001.2101.3001.6650.2","mod":"popu_387","extra":"{\"highlightScore\":0.0,\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~YuanLiJiHua~activity-2-142966027-blog-49804747.235^v43^pc_blog_bottom_relevance_base7\",\"dist_request_id\":\"1733930486580_55075\"}","dist_request_id":"1733930486580_55075","ab_strategy":"landingbge_opensearch_vector_rrf_v2","index":"2","strategy":"2~default~YuanLiJiHua~activity","dest":"https://devpress.csdn.net/v1/article/detail/142966027"}'>
	<div class="content-box">
		<div class="content-blog display-flex">
			<div class="title-box">
				<a href="https://devpress.csdn.net/v1/article/detail/142966027" class="tit" target="_blank"  data-report-click='{"ab":"new","spm":"1001.2101.3001.6650.2","mod":"popu_387","extra":"{\"highlightScore\":0.0,\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~YuanLiJiHua~activity-2-142966027-blog-49804747.235^v43^pc_blog_bottom_relevance_base7\",\"dist_request_id\":\"1733930486580_55075\"}","dist_request_id":"1733930486580_55075","ab_strategy":"landingbge_opensearch_vector_rrf_v2","index":"2","strategy":"2~default~YuanLiJiHua~activity","dest":"https://devpress.csdn.net/v1/article/detail/142966027"}'  data-report-query='spm=1001.2101.3001.6650.2&utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EYuanLiJiHua%7Eactivity-2-142966027-blog-49804747.235%5Ev43%5Epc_blog_bottom_relevance_base7&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EYuanLiJiHua%7Eactivity-2-142966027-blog-49804747.235%5Ev43%5Epc_blog_bottom_relevance_base7'>
					<div class="left ellipsis-online ellipsis-online-1"><em>QT</em>界面开发：入门篇</div>
					<div class="tag">最新发布</div>
				</a>
			</div>
			<div class="info-box display-flex">
				<div class="info">
					<a href="https://blog.csdn.net/U2396573637" target="_blank"><span class="blog-title">Stark的博客</span></a>
				</div>
				<div class="info display-flex">
					<span class="info-block time">10-15</span>
					<span class="info-block read"><img class="read-img" src="https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png" alt="">
					2859
					</span>
				</div>
			</div>
		</div>
		<div class="desc-box">
			<a href="https://devpress.csdn.net/v1/article/detail/142966027" target="_blank"  data-report-click='{"ab":"new","spm":"1001.2101.3001.6650.2","mod":"popu_387","extra":"{\"highlightScore\":0.0,\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~YuanLiJiHua~activity-2-142966027-blog-49804747.235^v43^pc_blog_bottom_relevance_base7\",\"dist_request_id\":\"1733930486580_55075\"}","dist_request_id":"1733930486580_55075","ab_strategy":"landingbge_opensearch_vector_rrf_v2","index":"2","strategy":"2~default~YuanLiJiHua~activity","dest":"https://devpress.csdn.net/v1/article/detail/142966027"}'  data-report-query='spm=1001.2101.3001.6650.2&utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EYuanLiJiHua%7Eactivity-2-142966027-blog-49804747.235%5Ev43%5Epc_blog_bottom_relevance_base7&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EYuanLiJiHua%7Eactivity-2-142966027-blog-49804747.235%5Ev43%5Epc_blog_bottom_relevance_base7'>
				<div class="desc ellipsis-online ellipsis-online-1">本节包括：<em>QT</em>的安装，认识，创建项目，快捷键，默认文件的讲解</div>
			</a>
		</div>
	</div>
</div>
<div class="recommend-item-box type_blog clearfix" data-url="https://devpress.csdn.net/v1/article/detail/134653005"  data-report-view='{"ab":"new","spm":"1001.2101.3001.6650.3","mod":"popu_387","extra":"{\"highlightScore\":0.0,\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~BlogCommendFromBaidu~activity-3-134653005-blog-49804747.235^v43^pc_blog_bottom_relevance_base7\",\"dist_request_id\":\"1733930486580_55075\"}","dist_request_id":"1733930486580_55075","ab_strategy":"landingbge_opensearch_vector_rrf_v2","index":"3","strategy":"2~default~BlogCommendFromBaidu~activity","dest":"https://devpress.csdn.net/v1/article/detail/134653005"}'>
	<div class="content-box">
		<div class="content-blog display-flex">
			<div class="title-box">
				<a href="https://devpress.csdn.net/v1/article/detail/134653005" class="tit" target="_blank"  data-report-click='{"ab":"new","spm":"1001.2101.3001.6650.3","mod":"popu_387","extra":"{\"highlightScore\":0.0,\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~BlogCommendFromBaidu~activity-3-134653005-blog-49804747.235^v43^pc_blog_bottom_relevance_base7\",\"dist_request_id\":\"1733930486580_55075\"}","dist_request_id":"1733930486580_55075","ab_strategy":"landingbge_opensearch_vector_rrf_v2","index":"3","strategy":"2~default~BlogCommendFromBaidu~activity","dest":"https://devpress.csdn.net/v1/article/detail/134653005"}'  data-report-query='spm=1001.2101.3001.6650.3&utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Eactivity-3-134653005-blog-49804747.235%5Ev43%5Epc_blog_bottom_relevance_base7&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Eactivity-3-134653005-blog-49804747.235%5Ev43%5Epc_blog_bottom_relevance_base7'>
					<div class="left ellipsis-online ellipsis-online-1"><em>QT</em><em>中</em>的 <em>容器</em>（container）-大全</div>
				</a>
			</div>
			<div class="info-box display-flex">
				<div class="info">
					<a href="https://blog.csdn.net/m0_58233509" target="_blank"><span class="blog-title">m0_58233509的博客</span></a>
				</div>
				<div class="info display-flex">
					<span class="info-block time">11-27</span>
					<span class="info-block read"><img class="read-img" src="https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png" alt="">
					1711
					</span>
				</div>
			</div>
		</div>
		<div class="desc-box">
			<a href="https://devpress.csdn.net/v1/article/detail/134653005" target="_blank"  data-report-click='{"ab":"new","spm":"1001.2101.3001.6650.3","mod":"popu_387","extra":"{\"highlightScore\":0.0,\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~BlogCommendFromBaidu~activity-3-134653005-blog-49804747.235^v43^pc_blog_bottom_relevance_base7\",\"dist_request_id\":\"1733930486580_55075\"}","dist_request_id":"1733930486580_55075","ab_strategy":"landingbge_opensearch_vector_rrf_v2","index":"3","strategy":"2~default~BlogCommendFromBaidu~activity","dest":"https://devpress.csdn.net/v1/article/detail/134653005"}'  data-report-query='spm=1001.2101.3001.6650.3&utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Eactivity-3-134653005-blog-49804747.235%5Ev43%5Epc_blog_bottom_relevance_base7&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Eactivity-3-134653005-blog-49804747.235%5Ev43%5Epc_blog_bottom_relevance_base7'>
				<div class="desc ellipsis-online ellipsis-online-1"><em>Qt</em>库提供了一套通用的基于模板的<em>容器</em><em>类</em>，可以用这些<em>类</em>存储指定<em>类</em>型的项。比如，你需要一个大小可变的QString的<em>数组</em>，则使用<em>QVect</em>or。这些<em>容器</em><em>类</em>比STL（C++标准模板库）<em>容器</em>设计得更轻量、更安全并且更易于使用。如果对STL不熟悉，或者倾向于用&ldquo;<em>Qt</em>的方式&rdquo;，那么你可以使用这些<em>类</em>，而不去使用STL的<em>类</em>。（STL<em>容器</em>使用详见首页其他作品）</div>
			</a>
		</div>
	</div>
</div>
		<dl id="recommend-item-box-tow" class="recommend-item-box type_blog clearfix">
			
		</dl>
<div class="recommend-item-box type_blog clearfix" data-url="https://blog.csdn.net/aoxuestudy/article/details/131244817"  data-report-view='{"ab":"new","spm":"1001.2101.3001.6650.4","mod":"popu_387","extra":"{\"highlightScore\":0.0,\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~BlogCommendFromBaidu~Rate-4-131244817-blog-49804747.235^v43^pc_blog_bottom_relevance_base7\",\"dist_request_id\":\"1733930486580_55075\"}","dist_request_id":"1733930486580_55075","ab_strategy":"landingbge_opensearch_vector_rrf_v2","index":"4","strategy":"2~default~BlogCommendFromBaidu~Rate","dest":"https://blog.csdn.net/aoxuestudy/article/details/131244817"}'>
	<div class="content-box">
		<div class="content-blog display-flex">
			<div class="title-box">
				<a href="https://blog.csdn.net/aoxuestudy/article/details/131244817" class="tit" target="_blank"  data-report-click='{"ab":"new","spm":"1001.2101.3001.6650.4","mod":"popu_387","extra":"{\"highlightScore\":0.0,\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~BlogCommendFromBaidu~Rate-4-131244817-blog-49804747.235^v43^pc_blog_bottom_relevance_base7\",\"dist_request_id\":\"1733930486580_55075\"}","dist_request_id":"1733930486580_55075","ab_strategy":"landingbge_opensearch_vector_rrf_v2","index":"4","strategy":"2~default~BlogCommendFromBaidu~Rate","dest":"https://blog.csdn.net/aoxuestudy/article/details/131244817"}'  data-report-query='spm=1001.2101.3001.6650.4&utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7ERate-4-131244817-blog-49804747.235%5Ev43%5Epc_blog_bottom_relevance_base7&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7ERate-4-131244817-blog-49804747.235%5Ev43%5Epc_blog_bottom_relevance_base7'>
					<div class="left ellipsis-online ellipsis-online-1"><em>Qt</em><em>中</em><em>QVect</em>or 、Q<em>List</em>、QSet、Q<em>Map</em>比较</div>
				</a>
			</div>
			<div class="info-box display-flex">
				<div class="info">
					<a href="https://blog.csdn.net/aoxuestudy" target="_blank"><span class="blog-title">aoxuestudy的专栏</span></a>
				</div>
				<div class="info display-flex">
					<span class="info-block time">06-16</span>
					<span class="info-block read"><img class="read-img" src="https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png" alt="">
					3398
					</span>
				</div>
			</div>
		</div>
		<div class="desc-box">
			<a href="https://blog.csdn.net/aoxuestudy/article/details/131244817" target="_blank"  data-report-click='{"ab":"new","spm":"1001.2101.3001.6650.4","mod":"popu_387","extra":"{\"highlightScore\":0.0,\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~BlogCommendFromBaidu~Rate-4-131244817-blog-49804747.235^v43^pc_blog_bottom_relevance_base7\",\"dist_request_id\":\"1733930486580_55075\"}","dist_request_id":"1733930486580_55075","ab_strategy":"landingbge_opensearch_vector_rrf_v2","index":"4","strategy":"2~default~BlogCommendFromBaidu~Rate","dest":"https://blog.csdn.net/aoxuestudy/article/details/131244817"}'  data-report-query='spm=1001.2101.3001.6650.4&utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7ERate-4-131244817-blog-49804747.235%5Ev43%5Epc_blog_bottom_relevance_base7&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7ERate-4-131244817-blog-49804747.235%5Ev43%5Epc_blog_bottom_relevance_base7'>
				<div class="desc ellipsis-online ellipsis-online-1"><em>QVect</em>or、Q<em>List</em>、QSet、Q<em>Map</em> 和 QQueue 是 <em>Qt</em> 框架<em>中</em>常用的<em>容器</em><em>类</em>，它们在存储和组织数据上有一些区别。</div>
			</a>
		</div>
	</div>
</div>
<div class="recommend-item-box type_blog clearfix" data-url="https://blog.csdn.net/qq_33266987/article/details/53333373"  data-report-view='{"ab":"new","spm":"1001.2101.3001.6650.5","mod":"popu_387","extra":"{\"highlightScore\":0.0,\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~BlogCommendFromBaidu~Rate-5-53333373-blog-49804747.235^v43^pc_blog_bottom_relevance_base7\",\"dist_request_id\":\"1733930486580_55075\"}","dist_request_id":"1733930486580_55075","ab_strategy":"landingbge_opensearch_vector_rrf_v2","index":"5","strategy":"2~default~BlogCommendFromBaidu~Rate","dest":"https://blog.csdn.net/qq_33266987/article/details/53333373"}'>
	<div class="content-box">
		<div class="content-blog display-flex">
			<div class="title-box">
				<a href="https://blog.csdn.net/qq_33266987/article/details/53333373" class="tit" target="_blank"  data-report-click='{"ab":"new","spm":"1001.2101.3001.6650.5","mod":"popu_387","extra":"{\"highlightScore\":0.0,\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~BlogCommendFromBaidu~Rate-5-53333373-blog-49804747.235^v43^pc_blog_bottom_relevance_base7\",\"dist_request_id\":\"1733930486580_55075\"}","dist_request_id":"1733930486580_55075","ab_strategy":"landingbge_opensearch_vector_rrf_v2","index":"5","strategy":"2~default~BlogCommendFromBaidu~Rate","dest":"https://blog.csdn.net/qq_33266987/article/details/53333373"}'  data-report-query='spm=1001.2101.3001.6650.5&utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7ERate-5-53333373-blog-49804747.235%5Ev43%5Epc_blog_bottom_relevance_base7&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7ERate-5-53333373-blog-49804747.235%5Ev43%5Epc_blog_bottom_relevance_base7'>
					<div class="left ellipsis-online ellipsis-online-1">Q<em>List</em> (<em>链表</em>) &amp; <em>QVect</em>or (<em>数组</em>)</div>
					<div class="tag">热门推荐</div>
				</a>
			</div>
			<div class="info-box display-flex">
				<div class="info">
					<a href="https://blog.csdn.net/qq_33266987" target="_blank"><span class="blog-title">非常道的博客</span></a>
				</div>
				<div class="info display-flex">
					<span class="info-block time">11-25</span>
					<span class="info-block read"><img class="read-img" src="https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png" alt="">
					2万+
					</span>
				</div>
			</div>
		</div>
		<div class="desc-box">
			<a href="https://blog.csdn.net/qq_33266987/article/details/53333373" target="_blank"  data-report-click='{"ab":"new","spm":"1001.2101.3001.6650.5","mod":"popu_387","extra":"{\"highlightScore\":0.0,\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~BlogCommendFromBaidu~Rate-5-53333373-blog-49804747.235^v43^pc_blog_bottom_relevance_base7\",\"dist_request_id\":\"1733930486580_55075\"}","dist_request_id":"1733930486580_55075","ab_strategy":"landingbge_opensearch_vector_rrf_v2","index":"5","strategy":"2~default~BlogCommendFromBaidu~Rate","dest":"https://blog.csdn.net/qq_33266987/article/details/53333373"}'  data-report-query='spm=1001.2101.3001.6650.5&utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7ERate-5-53333373-blog-49804747.235%5Ev43%5Epc_blog_bottom_relevance_base7&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7ERate-5-53333373-blog-49804747.235%5Ev43%5Epc_blog_bottom_relevance_base7'>
				<div class="desc ellipsis-online ellipsis-online-1">一个是随机存取，一个是连续存取，所以<em>list</em>插入删除很快，vector查询很快。
但是vector有个地方一定要注意：

vector：如果你添加元素，但是vector的容量（是容量，不是大小，容量比大小大，会预先多分配空间）不够的话，系统就会重新分配一段内存，然后把原先的内容全部拷贝过去，然后删除原先的内容。所以，如果你设定了一个纸箱vector的指针，或者说迭代器，在你添加元素之后，这个</div>
			</a>
		</div>
	</div>
</div>
<div class="recommend-item-box type_blog clearfix" data-url="https://blog.csdn.net/weixin_42164534/article/details/112953953"  data-report-view='{"ab":"new","spm":"1001.2101.3001.6650.6","mod":"popu_387","extra":"{\"highlightScore\":0.0,\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~OPENSEARCH~RRF-6-112953953-blog-49804747.235^v43^pc_blog_bottom_relevance_base7\",\"dist_request_id\":\"1733930486580_55075\"}","dist_request_id":"1733930486580_55075","ab_strategy":"landingbge_opensearch_vector_rrf_v2","index":"6","strategy":"2~default~OPENSEARCH~RRF","dest":"https://blog.csdn.net/weixin_42164534/article/details/112953953"}'>
	<div class="content-box">
		<div class="content-blog display-flex">
			<div class="title-box">
				<a href="https://blog.csdn.net/weixin_42164534/article/details/112953953" class="tit" target="_blank"  data-report-click='{"ab":"new","spm":"1001.2101.3001.6650.6","mod":"popu_387","extra":"{\"highlightScore\":0.0,\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~OPENSEARCH~RRF-6-112953953-blog-49804747.235^v43^pc_blog_bottom_relevance_base7\",\"dist_request_id\":\"1733930486580_55075\"}","dist_request_id":"1733930486580_55075","ab_strategy":"landingbge_opensearch_vector_rrf_v2","index":"6","strategy":"2~default~OPENSEARCH~RRF","dest":"https://blog.csdn.net/weixin_42164534/article/details/112953953"}'  data-report-query='spm=1001.2101.3001.6650.6&utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EOPENSEARCH%7ERRF-6-112953953-blog-49804747.235%5Ev43%5Epc_blog_bottom_relevance_base7&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EOPENSEARCH%7ERRF-6-112953953-blog-49804747.235%5Ev43%5Epc_blog_bottom_relevance_base7'>
					<div class="left ellipsis-online ellipsis-online-1"><em>qt</em> 一定要指定大小吗 <em>数组</em>_<em>Qt</em><em>中</em><em>丰富</em>的<em>容器</em><em>类</em><em>---</em><em>数组</em><em>QVect</em>or、<em>链表</em>Q<em>Link</em><em>ed</em><em>List</em>、<em>映射</em><em>表</em>Q<em>Map</em>、<em>哈希表</em>Q<em>Hash</em>...</div>
				</a>
			</div>
			<div class="info-box display-flex">
				<div class="info">
					<a href="https://blog.csdn.net/weixin_42164534" target="_blank"><span class="blog-title">weixin_42164534的博客</span></a>
				</div>
				<div class="info display-flex">
					<span class="info-block time">01-14</span>
					<span class="info-block read"><img class="read-img" src="https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png" alt="">
					779
					</span>
				</div>
			</div>
		</div>
		<div class="desc-box">
			<a href="https://blog.csdn.net/weixin_42164534/article/details/112953953" target="_blank"  data-report-click='{"ab":"new","spm":"1001.2101.3001.6650.6","mod":"popu_387","extra":"{\"highlightScore\":0.0,\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~OPENSEARCH~RRF-6-112953953-blog-49804747.235^v43^pc_blog_bottom_relevance_base7\",\"dist_request_id\":\"1733930486580_55075\"}","dist_request_id":"1733930486580_55075","ab_strategy":"landingbge_opensearch_vector_rrf_v2","index":"6","strategy":"2~default~OPENSEARCH~RRF","dest":"https://blog.csdn.net/weixin_42164534/article/details/112953953"}'  data-report-query='spm=1001.2101.3001.6650.6&utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EOPENSEARCH%7ERRF-6-112953953-blog-49804747.235%5Ev43%5Epc_blog_bottom_relevance_base7&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EOPENSEARCH%7ERRF-6-112953953-blog-49804747.235%5Ev43%5Epc_blog_bottom_relevance_base7'>
				<div class="desc ellipsis-online ellipsis-online-1">http://www.cnblogs.com/newstart/archive/2013/05/09/3068625.html在C++里做大型程序时，少不了要与<em>数组</em>、<em>链表</em>等数据结构打交道。就是最简单的字符串也常常让头痛万分，<em>Qt</em><em>中</em>有QString解决了字符串的头痛，那么其他<em>数组</em>等有没有更简单的解决方案呢？<em>Qt</em>作为一款优秀的<em>类</em>型库，当然不会没考虑这些。<em>Qt</em>提供了大量的&ldquo;<em>容器</em><em>类</em>&rdquo;，专门用于以某种方式存...</div>
			</a>
		</div>
	</div>
</div>
<div class="recommend-item-box type_blog clearfix" data-url="https://blog.csdn.net/wuyu92877/article/details/77891543"  data-report-view='{"ab":"new","spm":"1001.2101.3001.6650.7","mod":"popu_387","extra":"{\"highlightScore\":0.0,\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~VECTOR_COMMERCIAL~RRF-7-77891543-blog-49804747.235^v43^pc_blog_bottom_relevance_base7\",\"dist_request_id\":\"1733930486580_55075\"}","dist_request_id":"1733930486580_55075","ab_strategy":"landingbge_opensearch_vector_rrf_v2","index":"7","strategy":"2~default~VECTOR_COMMERCIAL~RRF","dest":"https://blog.csdn.net/wuyu92877/article/details/77891543"}'>
	<div class="content-box">
		<div class="content-blog display-flex">
			<div class="title-box">
				<a href="https://blog.csdn.net/wuyu92877/article/details/77891543" class="tit" target="_blank"  data-report-click='{"ab":"new","spm":"1001.2101.3001.6650.7","mod":"popu_387","extra":"{\"highlightScore\":0.0,\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~VECTOR_COMMERCIAL~RRF-7-77891543-blog-49804747.235^v43^pc_blog_bottom_relevance_base7\",\"dist_request_id\":\"1733930486580_55075\"}","dist_request_id":"1733930486580_55075","ab_strategy":"landingbge_opensearch_vector_rrf_v2","index":"7","strategy":"2~default~VECTOR_COMMERCIAL~RRF","dest":"https://blog.csdn.net/wuyu92877/article/details/77891543"}'  data-report-query='spm=1001.2101.3001.6650.7&utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EVECTOR_COMMERCIAL%7ERRF-7-77891543-blog-49804747.235%5Ev43%5Epc_blog_bottom_relevance_base7&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EVECTOR_COMMERCIAL%7ERRF-7-77891543-blog-49804747.235%5Ev43%5Epc_blog_bottom_relevance_base7'>
					<div class="left ellipsis-online ellipsis-online-1"><em>Qt</em>之<em>丰富</em>的<em>容器</em><em>类</em><em>---</em><em>数组</em><em>QVect</em>or、<em>链表</em>Q<em>Link</em><em>ed</em><em>List</em>、<em>映射</em><em>表</em>Q<em>Map</em>、<em>哈希表</em>Q<em>Hash</em></div>
				</a>
			</div>
			<div class="info-box display-flex">
				<div class="info">
					<a href="https://blog.csdn.net/wuyu92877" target="_blank"><span class="blog-title">wuyu92877的专栏</span></a>
				</div>
				<div class="info display-flex">
					<span class="info-block time">09-08</span>
					<span class="info-block read"><img class="read-img" src="https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png" alt="">
					702
					</span>
				</div>
			</div>
		</div>
		<div class="desc-box">
			<a href="https://blog.csdn.net/wuyu92877/article/details/77891543" target="_blank"  data-report-click='{"ab":"new","spm":"1001.2101.3001.6650.7","mod":"popu_387","extra":"{\"highlightScore\":0.0,\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~VECTOR_COMMERCIAL~RRF-7-77891543-blog-49804747.235^v43^pc_blog_bottom_relevance_base7\",\"dist_request_id\":\"1733930486580_55075\"}","dist_request_id":"1733930486580_55075","ab_strategy":"landingbge_opensearch_vector_rrf_v2","index":"7","strategy":"2~default~VECTOR_COMMERCIAL~RRF","dest":"https://blog.csdn.net/wuyu92877/article/details/77891543"}'  data-report-query='spm=1001.2101.3001.6650.7&utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EVECTOR_COMMERCIAL%7ERRF-7-77891543-blog-49804747.235%5Ev43%5Epc_blog_bottom_relevance_base7&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EVECTOR_COMMERCIAL%7ERRF-7-77891543-blog-49804747.235%5Ev43%5Epc_blog_bottom_relevance_base7'>
				<div class="desc ellipsis-online ellipsis-online-1">本文转载：http://www.cnblogs.com/newstart/archive/2013/05/09/3068625.html

在C++里做大型程序时，少不了要与<em>数组</em>、<em>链表</em>等数据结构打交道。就是最简单的字符串也常常让头痛万分，<em>Qt</em><em>中</em>有QString解决了字符串的头痛，那么其他<em>数组</em>等有没有更简单的解决方案呢？<em>Qt</em>作为一款优秀的<em>类</em>型库，当然不会没考虑这些。<em>Qt</em>提供了大量的&ldquo;<em>容器</em><em>类</em>&rdquo;，专</div>
			</a>
		</div>
	</div>
</div>
<div class="recommend-item-box type_blog clearfix" data-url="https://devpress.csdn.net/v1/article/detail/17739179"  data-report-view='{"ab":"new","spm":"1001.2101.3001.6650.8","mod":"popu_387","extra":"{\"highlightScore\":0.0,\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~VECTOR_COMMERCIAL~activity-8-17739179-blog-49804747.235^v43^pc_blog_bottom_relevance_base7\",\"dist_request_id\":\"1733930486580_55075\"}","dist_request_id":"1733930486580_55075","ab_strategy":"landingbge_opensearch_vector_rrf_v2","index":"8","strategy":"2~default~VECTOR_COMMERCIAL~activity","dest":"https://devpress.csdn.net/v1/article/detail/17739179"}'>
	<div class="content-box">
		<div class="content-blog display-flex">
			<div class="title-box">
				<a href="https://devpress.csdn.net/v1/article/detail/17739179" class="tit" target="_blank"  data-report-click='{"ab":"new","spm":"1001.2101.3001.6650.8","mod":"popu_387","extra":"{\"highlightScore\":0.0,\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~VECTOR_COMMERCIAL~activity-8-17739179-blog-49804747.235^v43^pc_blog_bottom_relevance_base7\",\"dist_request_id\":\"1733930486580_55075\"}","dist_request_id":"1733930486580_55075","ab_strategy":"landingbge_opensearch_vector_rrf_v2","index":"8","strategy":"2~default~VECTOR_COMMERCIAL~activity","dest":"https://devpress.csdn.net/v1/article/detail/17739179"}'  data-report-query='spm=1001.2101.3001.6650.8&utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EVECTOR_COMMERCIAL%7Eactivity-8-17739179-blog-49804747.235%5Ev43%5Epc_blog_bottom_relevance_base7&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EVECTOR_COMMERCIAL%7Eactivity-8-17739179-blog-49804747.235%5Ev43%5Epc_blog_bottom_relevance_base7'>
					<div class="left ellipsis-online ellipsis-online-1"><em>QT</em><em>容器</em><em>类</em>（一） 之 <em>QVect</em>or 、Q<em>Link</em><em>ed</em><em>List</em> 和 Q<em>List</em></div>
				</a>
			</div>
			<div class="info-box display-flex">
				<div class="info">
					<a href="https://blog.csdn.net/hustyangju" target="_blank"><span class="blog-title">hustyangju的足迹</span></a>
				</div>
				<div class="info display-flex">
					<span class="info-block time">01-01</span>
					<span class="info-block read"><img class="read-img" src="https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png" alt="">
					9471
					</span>
				</div>
			</div>
		</div>
		<div class="desc-box">
			<a href="https://devpress.csdn.net/v1/article/detail/17739179" target="_blank"  data-report-click='{"ab":"new","spm":"1001.2101.3001.6650.8","mod":"popu_387","extra":"{\"highlightScore\":0.0,\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~VECTOR_COMMERCIAL~activity-8-17739179-blog-49804747.235^v43^pc_blog_bottom_relevance_base7\",\"dist_request_id\":\"1733930486580_55075\"}","dist_request_id":"1733930486580_55075","ab_strategy":"landingbge_opensearch_vector_rrf_v2","index":"8","strategy":"2~default~VECTOR_COMMERCIAL~activity","dest":"https://devpress.csdn.net/v1/article/detail/17739179"}'  data-report-query='spm=1001.2101.3001.6650.8&utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EVECTOR_COMMERCIAL%7Eactivity-8-17739179-blog-49804747.235%5Ev43%5Epc_blog_bottom_relevance_base7&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EVECTOR_COMMERCIAL%7Eactivity-8-17739179-blog-49804747.235%5Ev43%5Epc_blog_bottom_relevance_base7'>
				<div class="desc ellipsis-online ellipsis-online-1"><em>QVect</em>or 、Q<em>Link</em><em>ed</em><em>List</em> 和 Q<em>List</em></div>
			</a>
		</div>
	</div>
</div>
<div class="recommend-item-box type_blog clearfix" data-url="https://blog.csdn.net/LearnLHC/article/details/114140752"  data-report-view='{"ab":"new","spm":"1001.2101.3001.6650.9","mod":"popu_387","extra":"{\"highlightScore\":0.0,\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~OPENSEARCH~RRF-9-114140752-blog-49804747.235^v43^pc_blog_bottom_relevance_base7\",\"dist_request_id\":\"1733930486580_55075\"}","dist_request_id":"1733930486580_55075","ab_strategy":"landingbge_opensearch_vector_rrf_v2","index":"9","strategy":"2~default~OPENSEARCH~RRF","dest":"https://blog.csdn.net/LearnLHC/article/details/114140752"}'>
	<div class="content-box">
		<div class="content-blog display-flex">
			<div class="title-box">
				<a href="https://blog.csdn.net/LearnLHC/article/details/114140752" class="tit" target="_blank"  data-report-click='{"ab":"new","spm":"1001.2101.3001.6650.9","mod":"popu_387","extra":"{\"highlightScore\":0.0,\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~OPENSEARCH~RRF-9-114140752-blog-49804747.235^v43^pc_blog_bottom_relevance_base7\",\"dist_request_id\":\"1733930486580_55075\"}","dist_request_id":"1733930486580_55075","ab_strategy":"landingbge_opensearch_vector_rrf_v2","index":"9","strategy":"2~default~OPENSEARCH~RRF","dest":"https://blog.csdn.net/LearnLHC/article/details/114140752"}'  data-report-query='spm=1001.2101.3001.6650.9&utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EOPENSEARCH%7ERRF-9-114140752-blog-49804747.235%5Ev43%5Epc_blog_bottom_relevance_base7&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EOPENSEARCH%7ERRF-9-114140752-blog-49804747.235%5Ev43%5Epc_blog_bottom_relevance_base7'>
					<div class="left ellipsis-online ellipsis-online-1"><em>QT</em> <em>容器</em> Q<em>List</em>，Q<em>Link</em><em>ed</em><em>List</em>，<em>QVect</em>or，Q<em>Map</em>，Q<em>Hash</em>优缺点，与使用范围</div>
				</a>
			</div>
			<div class="info-box display-flex">
				<div class="info">
					<a href="https://blog.csdn.net/LearnLHC" target="_blank"><span class="blog-title">LearnLHC的博客</span></a>
				</div>
				<div class="info display-flex">
					<span class="info-block time">03-01</span>
					<span class="info-block read"><img class="read-img" src="https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png" alt="">
					1272
					</span>
				</div>
			</div>
		</div>
		<div class="desc-box">
			<a href="https://blog.csdn.net/LearnLHC/article/details/114140752" target="_blank"  data-report-click='{"ab":"new","spm":"1001.2101.3001.6650.9","mod":"popu_387","extra":"{\"highlightScore\":0.0,\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~OPENSEARCH~RRF-9-114140752-blog-49804747.235^v43^pc_blog_bottom_relevance_base7\",\"dist_request_id\":\"1733930486580_55075\"}","dist_request_id":"1733930486580_55075","ab_strategy":"landingbge_opensearch_vector_rrf_v2","index":"9","strategy":"2~default~OPENSEARCH~RRF","dest":"https://blog.csdn.net/LearnLHC/article/details/114140752"}'  data-report-query='spm=1001.2101.3001.6650.9&utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EOPENSEARCH%7ERRF-9-114140752-blog-49804747.235%5Ev43%5Epc_blog_bottom_relevance_base7&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EOPENSEARCH%7ERRF-9-114140752-blog-49804747.235%5Ev43%5Epc_blog_bottom_relevance_base7'>
				<div class="desc ellipsis-online ellipsis-online-1">https://<em>qt</em>doc.cn/Src/C/Container_Classes/Container_Classes.html

一、前言：

如果想看 STL<em>容器</em> 的优缺点，请查看如下文章：

《C++ STL<em>容器</em> 底层数据结构》 https://blog.csdn.net/LearnLHC/article/details/89552420?spm=1001.2014.3001.5502

《c++ <em>map</em>、multi<em>map</em> 的使用方法》  https://blog.csdn.net/LearnLHC..</div>
			</a>
		</div>
	</div>
</div>
<div class="recommend-item-box type_blog clearfix" data-url="https://blog.csdn.net/dengjh0226/article/details/38326765"  data-report-view='{"ab":"new","spm":"1001.2101.3001.6650.10","mod":"popu_387","extra":"{\"highlightScore\":0.0,\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~VECTOR_COMMERCIAL~RRF-10-38326765-blog-49804747.235^v43^pc_blog_bottom_relevance_base7\",\"dist_request_id\":\"1733930486580_55075\"}","dist_request_id":"1733930486580_55075","ab_strategy":"landingbge_opensearch_vector_rrf_v2","index":"10","strategy":"2~default~VECTOR_COMMERCIAL~RRF","dest":"https://blog.csdn.net/dengjh0226/article/details/38326765"}'>
	<div class="content-box">
		<div class="content-blog display-flex">
			<div class="title-box">
				<a href="https://blog.csdn.net/dengjh0226/article/details/38326765" class="tit" target="_blank"  data-report-click='{"ab":"new","spm":"1001.2101.3001.6650.10","mod":"popu_387","extra":"{\"highlightScore\":0.0,\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~VECTOR_COMMERCIAL~RRF-10-38326765-blog-49804747.235^v43^pc_blog_bottom_relevance_base7\",\"dist_request_id\":\"1733930486580_55075\"}","dist_request_id":"1733930486580_55075","ab_strategy":"landingbge_opensearch_vector_rrf_v2","index":"10","strategy":"2~default~VECTOR_COMMERCIAL~RRF","dest":"https://blog.csdn.net/dengjh0226/article/details/38326765"}'  data-report-query='spm=1001.2101.3001.6650.10&utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EVECTOR_COMMERCIAL%7ERRF-10-38326765-blog-49804747.235%5Ev43%5Epc_blog_bottom_relevance_base7&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EVECTOR_COMMERCIAL%7ERRF-10-38326765-blog-49804747.235%5Ev43%5Epc_blog_bottom_relevance_base7'>
					<div class="left ellipsis-online ellipsis-online-1"><em>数组</em>、<em>链表</em>、哈希&hellip;&hellip;<em>Qt</em><em>中</em><em>丰富</em>的<em>容器</em><em>类</em></div>
				</a>
			</div>
			<div class="info-box display-flex">
				<div class="info">
					<a href="https://blog.csdn.net/dengjh0226" target="_blank"><span class="blog-title">dengjh0226的专栏</span></a>
				</div>
				<div class="info display-flex">
					<span class="info-block time">07-31</span>
					<span class="info-block read"><img class="read-img" src="https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png" alt="">
					1330
					</span>
				</div>
			</div>
		</div>
		<div class="desc-box">
			<a href="https://blog.csdn.net/dengjh0226/article/details/38326765" target="_blank"  data-report-click='{"ab":"new","spm":"1001.2101.3001.6650.10","mod":"popu_387","extra":"{\"highlightScore\":0.0,\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~VECTOR_COMMERCIAL~RRF-10-38326765-blog-49804747.235^v43^pc_blog_bottom_relevance_base7\",\"dist_request_id\":\"1733930486580_55075\"}","dist_request_id":"1733930486580_55075","ab_strategy":"landingbge_opensearch_vector_rrf_v2","index":"10","strategy":"2~default~VECTOR_COMMERCIAL~RRF","dest":"https://blog.csdn.net/dengjh0226/article/details/38326765"}'  data-report-query='spm=1001.2101.3001.6650.10&utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EVECTOR_COMMERCIAL%7ERRF-10-38326765-blog-49804747.235%5Ev43%5Epc_blog_bottom_relevance_base7&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EVECTOR_COMMERCIAL%7ERRF-10-38326765-blog-49804747.235%5Ev43%5Epc_blog_bottom_relevance_base7'>
				<div class="desc ellipsis-online ellipsis-online-1"><em>数组</em>、<em>链表</em>、哈希&hellip;&hellip;<em>Qt</em><em>中</em><em>丰富</em>的<em>容器</em><em>类</em>


在C++里做大型程序时，少不了要与<em>数组</em>、<em>链表</em>等数据结构打交道。就是最简单的字符串也常常让头痛万分，<em>Qt</em><em>中</em>有QString解决了字符串的头痛，那么其他<em>数组</em>等有没有更简单的解决方案呢？
<em>Qt</em>作为一款优秀的<em>类</em>型库，当然不会没考虑这些。<em>Qt</em>提供了大量的&ldquo;<em>容器</em><em>类</em>&rdquo;，专门用于以某种方式存储大量内容，QString其实只是这大量的<em>容器</em><em>类</em>的一种。
我在这里介绍</div>
			</a>
		</div>
	</div>
</div>
<div class="recommend-item-box type_blog clearfix" data-url="https://blog.csdn.net/ikisstherain/article/details/60475410"  data-report-view='{"ab":"new","spm":"1001.2101.3001.6650.11","mod":"popu_387","extra":"{\"highlightScore\":0.0,\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~BlogCommendFromBaidu~Rate-11-60475410-blog-49804747.235^v43^pc_blog_bottom_relevance_base7\",\"dist_request_id\":\"1733930486580_55075\"}","dist_request_id":"1733930486580_55075","ab_strategy":"landingbge_opensearch_vector_rrf_v2","index":"11","strategy":"2~default~BlogCommendFromBaidu~Rate","dest":"https://blog.csdn.net/ikisstherain/article/details/60475410"}'>
	<div class="content-box">
		<div class="content-blog display-flex">
			<div class="title-box">
				<a href="https://blog.csdn.net/ikisstherain/article/details/60475410" class="tit" target="_blank"  data-report-click='{"ab":"new","spm":"1001.2101.3001.6650.11","mod":"popu_387","extra":"{\"highlightScore\":0.0,\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~BlogCommendFromBaidu~Rate-11-60475410-blog-49804747.235^v43^pc_blog_bottom_relevance_base7\",\"dist_request_id\":\"1733930486580_55075\"}","dist_request_id":"1733930486580_55075","ab_strategy":"landingbge_opensearch_vector_rrf_v2","index":"11","strategy":"2~default~BlogCommendFromBaidu~Rate","dest":"https://blog.csdn.net/ikisstherain/article/details/60475410"}'  data-report-query='spm=1001.2101.3001.6650.11&utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7ERate-11-60475410-blog-49804747.235%5Ev43%5Epc_blog_bottom_relevance_base7&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7ERate-11-60475410-blog-49804747.235%5Ev43%5Epc_blog_bottom_relevance_base7'>
					<div class="left ellipsis-online ellipsis-online-1"><em>Qt</em><em>容器</em><em>QVect</em>or</div>
				</a>
			</div>
			<div class="info-box display-flex">
				<div class="info">
					<a href="https://blog.csdn.net/ikisstherain" target="_blank"><span class="blog-title">ikisstherain的博客</span></a>
				</div>
				<div class="info display-flex">
					<span class="info-block time">03-05</span>
					<span class="info-block read"><img class="read-img" src="https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png" alt="">
					1073
					</span>
				</div>
			</div>
		</div>
		<div class="desc-box">
			<a href="https://blog.csdn.net/ikisstherain/article/details/60475410" target="_blank"  data-report-click='{"ab":"new","spm":"1001.2101.3001.6650.11","mod":"popu_387","extra":"{\"highlightScore\":0.0,\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~BlogCommendFromBaidu~Rate-11-60475410-blog-49804747.235^v43^pc_blog_bottom_relevance_base7\",\"dist_request_id\":\"1733930486580_55075\"}","dist_request_id":"1733930486580_55075","ab_strategy":"landingbge_opensearch_vector_rrf_v2","index":"11","strategy":"2~default~BlogCommendFromBaidu~Rate","dest":"https://blog.csdn.net/ikisstherain/article/details/60475410"}'  data-report-query='spm=1001.2101.3001.6650.11&utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7ERate-11-60475410-blog-49804747.235%5Ev43%5Epc_blog_bottom_relevance_base7&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7ERate-11-60475410-blog-49804747.235%5Ev43%5Epc_blog_bottom_relevance_base7'>
				<div class="desc ellipsis-online ellipsis-online-1"><em>QVect</em>or&gt;&nbsp;cityStations_6_variables_avg;
<em>QVect</em>or&nbsp;oneStations_6_variables_avg;
往&nbsp;oneStations_6_variables_avg弹进5个数据
再往cityStations_6_variables_avg弹进&nbsp;oneStations_6_variables_avg
能通过下标索引访问里面的数据吗


答案</div>
			</a>
		</div>
	</div>
</div>
<div class="recommend-item-box type_blog clearfix" data-url="https://blog.csdn.net/weixin_45378526/article/details/133711128"  data-report-view='{"ab":"new","spm":"1001.2101.3001.6650.12","mod":"popu_387","extra":"{\"highlightScore\":0.0,\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~BlogCommendFromBaidu~Rate-12-133711128-blog-49804747.235^v43^pc_blog_bottom_relevance_base7\",\"dist_request_id\":\"1733930486580_55075\"}","dist_request_id":"1733930486580_55075","ab_strategy":"landingbge_opensearch_vector_rrf_v2","index":"12","strategy":"2~default~BlogCommendFromBaidu~Rate","dest":"https://blog.csdn.net/weixin_45378526/article/details/133711128"}'>
	<div class="content-box">
		<div class="content-blog display-flex">
			<div class="title-box">
				<a href="https://blog.csdn.net/weixin_45378526/article/details/133711128" class="tit" target="_blank"  data-report-click='{"ab":"new","spm":"1001.2101.3001.6650.12","mod":"popu_387","extra":"{\"highlightScore\":0.0,\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~BlogCommendFromBaidu~Rate-12-133711128-blog-49804747.235^v43^pc_blog_bottom_relevance_base7\",\"dist_request_id\":\"1733930486580_55075\"}","dist_request_id":"1733930486580_55075","ab_strategy":"landingbge_opensearch_vector_rrf_v2","index":"12","strategy":"2~default~BlogCommendFromBaidu~Rate","dest":"https://blog.csdn.net/weixin_45378526/article/details/133711128"}'  data-report-query='spm=1001.2101.3001.6650.12&utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7ERate-12-133711128-blog-49804747.235%5Ev43%5Epc_blog_bottom_relevance_base7&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7ERate-12-133711128-blog-49804747.235%5Ev43%5Epc_blog_bottom_relevance_base7'>
					<div class="left ellipsis-online ellipsis-online-1">【<em>Qt</em>】<em>数组</em>数据<em>类</em>型及用法</div>
				</a>
			</div>
			<div class="info-box display-flex">
				<div class="info">
					<a href="https://blog.csdn.net/weixin_45378526" target="_blank"><span class="blog-title">weixin_45378526的博客</span></a>
				</div>
				<div class="info display-flex">
					<span class="info-block time">10-09</span>
					<span class="info-block read"><img class="read-img" src="https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png" alt="">
					4835
					</span>
				</div>
			</div>
		</div>
		<div class="desc-box">
			<a href="https://blog.csdn.net/weixin_45378526/article/details/133711128" target="_blank"  data-report-click='{"ab":"new","spm":"1001.2101.3001.6650.12","mod":"popu_387","extra":"{\"highlightScore\":0.0,\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~BlogCommendFromBaidu~Rate-12-133711128-blog-49804747.235^v43^pc_blog_bottom_relevance_base7\",\"dist_request_id\":\"1733930486580_55075\"}","dist_request_id":"1733930486580_55075","ab_strategy":"landingbge_opensearch_vector_rrf_v2","index":"12","strategy":"2~default~BlogCommendFromBaidu~Rate","dest":"https://blog.csdn.net/weixin_45378526/article/details/133711128"}'  data-report-query='spm=1001.2101.3001.6650.12&utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7ERate-12-133711128-blog-49804747.235%5Ev43%5Epc_blog_bottom_relevance_base7&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7ERate-12-133711128-blog-49804747.235%5Ev43%5Epc_blog_bottom_relevance_base7'>
				<div class="desc ellipsis-online ellipsis-online-1">Q<em>List</em> 是<em>Qt</em><em>中</em>最常见的动态<em>数组</em><em>类</em>型之一。它可以存储任何数据<em>类</em>型 T，包括基本数据<em>类</em>型（例如 int、double）和自定义<em>类</em>。Q<em>List</em> 具有自动扩展和收缩功能，使其非常适合用作动态大小的<em>数组</em>。</div>
			</a>
		</div>
	</div>
</div>
<div class="recommend-item-box type_blog clearfix" data-url="https://blog.csdn.net/weixin_39778815/article/details/118819824"  data-report-view='{"ab":"new","spm":"1001.2101.3001.6650.13","mod":"popu_387","extra":"{\"highlightScore\":0.0,\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~BlogCommendFromBaidu~Rate-13-118819824-blog-49804747.235^v43^pc_blog_bottom_relevance_base7\",\"dist_request_id\":\"1733930486580_55075\"}","dist_request_id":"1733930486580_55075","ab_strategy":"landingbge_opensearch_vector_rrf_v2","index":"13","strategy":"2~default~BlogCommendFromBaidu~Rate","dest":"https://blog.csdn.net/weixin_39778815/article/details/118819824"}'>
	<div class="content-box">
		<div class="content-blog display-flex">
			<div class="title-box">
				<a href="https://blog.csdn.net/weixin_39778815/article/details/118819824" class="tit" target="_blank"  data-report-click='{"ab":"new","spm":"1001.2101.3001.6650.13","mod":"popu_387","extra":"{\"highlightScore\":0.0,\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~BlogCommendFromBaidu~Rate-13-118819824-blog-49804747.235^v43^pc_blog_bottom_relevance_base7\",\"dist_request_id\":\"1733930486580_55075\"}","dist_request_id":"1733930486580_55075","ab_strategy":"landingbge_opensearch_vector_rrf_v2","index":"13","strategy":"2~default~BlogCommendFromBaidu~Rate","dest":"https://blog.csdn.net/weixin_39778815/article/details/118819824"}'  data-report-query='spm=1001.2101.3001.6650.13&utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7ERate-13-118819824-blog-49804747.235%5Ev43%5Epc_blog_bottom_relevance_base7&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7ERate-13-118819824-blog-49804747.235%5Ev43%5Epc_blog_bottom_relevance_base7'>
					<div class="left ellipsis-online ellipsis-online-1">遍历<em>qvect</em>or,嵌套<em>QVect</em>or指针内存处理</div>
				</a>
			</div>
			<div class="info-box display-flex">
				<div class="info">
					<a href="https://blog.csdn.net/weixin_39778815" target="_blank"><span class="blog-title">weixin_39778815的博客</span></a>
				</div>
				<div class="info display-flex">
					<span class="info-block time">02-12</span>
					<span class="info-block read"><img class="read-img" src="https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png" alt="">
					757
					</span>
				</div>
			</div>
		</div>
		<div class="desc-box">
			<a href="https://blog.csdn.net/weixin_39778815/article/details/118819824" target="_blank"  data-report-click='{"ab":"new","spm":"1001.2101.3001.6650.13","mod":"popu_387","extra":"{\"highlightScore\":0.0,\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~BlogCommendFromBaidu~Rate-13-118819824-blog-49804747.235^v43^pc_blog_bottom_relevance_base7\",\"dist_request_id\":\"1733930486580_55075\"}","dist_request_id":"1733930486580_55075","ab_strategy":"landingbge_opensearch_vector_rrf_v2","index":"13","strategy":"2~default~BlogCommendFromBaidu~Rate","dest":"https://blog.csdn.net/weixin_39778815/article/details/118819824"}'  data-report-query='spm=1001.2101.3001.6650.13&utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7ERate-13-118819824-blog-49804747.235%5Ev43%5Epc_blog_bottom_relevance_base7&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7ERate-13-118819824-blog-49804747.235%5Ev43%5Epc_blog_bottom_relevance_base7'>
				<div class="desc ellipsis-online ellipsis-online-1">I&#39;ve inherit<em>ed</em> a substantial <em>Qt</em>5 project, where the accumulative memory leakage is becoming a serious issue. (Yes, memory leakage should rarely be tolerat<em>ed</em> but with real life budget and time constrai...</div>
			</a>
		</div>
	</div>
</div>
<div class="recommend-item-box type_blog clearfix" data-url="https://blog.csdn.net/m0_45867846/article/details/107684324"  data-report-view='{"ab":"new","spm":"1001.2101.3001.6650.14","mod":"popu_387","extra":"{\"highlightScore\":0.0,\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~BlogCommendFromBaidu~Rate-14-107684324-blog-49804747.235^v43^pc_blog_bottom_relevance_base7\",\"dist_request_id\":\"1733930486580_55075\"}","dist_request_id":"1733930486580_55075","ab_strategy":"landingbge_opensearch_vector_rrf_v2","index":"14","strategy":"2~default~BlogCommendFromBaidu~Rate","dest":"https://blog.csdn.net/m0_45867846/article/details/107684324"}'>
	<div class="content-box">
		<div class="content-blog display-flex">
			<div class="title-box">
				<a href="https://blog.csdn.net/m0_45867846/article/details/107684324" class="tit" target="_blank"  data-report-click='{"ab":"new","spm":"1001.2101.3001.6650.14","mod":"popu_387","extra":"{\"highlightScore\":0.0,\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~BlogCommendFromBaidu~Rate-14-107684324-blog-49804747.235^v43^pc_blog_bottom_relevance_base7\",\"dist_request_id\":\"1733930486580_55075\"}","dist_request_id":"1733930486580_55075","ab_strategy":"landingbge_opensearch_vector_rrf_v2","index":"14","strategy":"2~default~BlogCommendFromBaidu~Rate","dest":"https://blog.csdn.net/m0_45867846/article/details/107684324"}'  data-report-query='spm=1001.2101.3001.6650.14&utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7ERate-14-107684324-blog-49804747.235%5Ev43%5Epc_blog_bottom_relevance_base7&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7ERate-14-107684324-blog-49804747.235%5Ev43%5Epc_blog_bottom_relevance_base7'>
					<div class="left ellipsis-online ellipsis-online-1"><em>Qt</em> - <em>容器</em>(QString 常用转换)</div>
				</a>
			</div>
			<div class="info-box display-flex">
				<div class="info">
					<a href="https://blog.csdn.net/m0_45867846" target="_blank"><span class="blog-title">weifc-wei 的博客</span></a>
				</div>
				<div class="info display-flex">
					<span class="info-block time">07-30</span>
					<span class="info-block read"><img class="read-img" src="https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png" alt="">
					292
					</span>
				</div>
			</div>
		</div>
		<div class="desc-box">
			<a href="https://blog.csdn.net/m0_45867846/article/details/107684324" target="_blank"  data-report-click='{"ab":"new","spm":"1001.2101.3001.6650.14","mod":"popu_387","extra":"{\"highlightScore\":0.0,\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~BlogCommendFromBaidu~Rate-14-107684324-blog-49804747.235^v43^pc_blog_bottom_relevance_base7\",\"dist_request_id\":\"1733930486580_55075\"}","dist_request_id":"1733930486580_55075","ab_strategy":"landingbge_opensearch_vector_rrf_v2","index":"14","strategy":"2~default~BlogCommendFromBaidu~Rate","dest":"https://blog.csdn.net/m0_45867846/article/details/107684324"}'  data-report-query='spm=1001.2101.3001.6650.14&utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7ERate-14-107684324-blog-49804747.235%5Ev43%5Epc_blog_bottom_relevance_base7&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7ERate-14-107684324-blog-49804747.235%5Ev43%5Epc_blog_bottom_relevance_base7'>
				<div class="desc ellipsis-online ellipsis-online-1"><em>容器</em>
QString常用初始化方式：

==================================================================

==================================================================

==================================================================

================================</div>
			</a>
		</div>
	</div>
</div>
<div class="recommend-item-box type_blog clearfix" data-url="https://blog.csdn.net/weixin_45913886/article/details/128408950"  data-report-view='{"ab":"new","spm":"1001.2101.3001.6650.15","mod":"popu_387","extra":"{\"highlightScore\":0.0,\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~BlogCommendFromBaidu~Rate-15-128408950-blog-49804747.235^v43^pc_blog_bottom_relevance_base7\",\"dist_request_id\":\"1733930486580_55075\"}","dist_request_id":"1733930486580_55075","ab_strategy":"landingbge_opensearch_vector_rrf_v2","index":"15","strategy":"2~default~BlogCommendFromBaidu~Rate","dest":"https://blog.csdn.net/weixin_45913886/article/details/128408950"}'>
	<div class="content-box">
		<div class="content-blog display-flex">
			<div class="title-box">
				<a href="https://blog.csdn.net/weixin_45913886/article/details/128408950" class="tit" target="_blank"  data-report-click='{"ab":"new","spm":"1001.2101.3001.6650.15","mod":"popu_387","extra":"{\"highlightScore\":0.0,\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~BlogCommendFromBaidu~Rate-15-128408950-blog-49804747.235^v43^pc_blog_bottom_relevance_base7\",\"dist_request_id\":\"1733930486580_55075\"}","dist_request_id":"1733930486580_55075","ab_strategy":"landingbge_opensearch_vector_rrf_v2","index":"15","strategy":"2~default~BlogCommendFromBaidu~Rate","dest":"https://blog.csdn.net/weixin_45913886/article/details/128408950"}'  data-report-query='spm=1001.2101.3001.6650.15&utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7ERate-15-128408950-blog-49804747.235%5Ev43%5Epc_blog_bottom_relevance_base7&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7ERate-15-128408950-blog-49804747.235%5Ev43%5Epc_blog_bottom_relevance_base7'>
					<div class="left ellipsis-online ellipsis-online-1">1、<em>QT</em>基础知识</div>
				</a>
			</div>
			<div class="info-box display-flex">
				<div class="info">
					<a href="https://blog.csdn.net/weixin_45913886" target="_blank"><span class="blog-title">weixin_45913886的博客</span></a>
				</div>
				<div class="info display-flex">
					<span class="info-block time">12-22</span>
					<span class="info-block read"><img class="read-img" src="https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png" alt="">
					2302
					</span>
				</div>
			</div>
		</div>
		<div class="desc-box">
			<a href="https://blog.csdn.net/weixin_45913886/article/details/128408950" target="_blank"  data-report-click='{"ab":"new","spm":"1001.2101.3001.6650.15","mod":"popu_387","extra":"{\"highlightScore\":0.0,\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~BlogCommendFromBaidu~Rate-15-128408950-blog-49804747.235^v43^pc_blog_bottom_relevance_base7\",\"dist_request_id\":\"1733930486580_55075\"}","dist_request_id":"1733930486580_55075","ab_strategy":"landingbge_opensearch_vector_rrf_v2","index":"15","strategy":"2~default~BlogCommendFromBaidu~Rate","dest":"https://blog.csdn.net/weixin_45913886/article/details/128408950"}'  data-report-query='spm=1001.2101.3001.6650.15&utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7ERate-15-128408950-blog-49804747.235%5Ev43%5Epc_blog_bottom_relevance_base7&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7ERate-15-128408950-blog-49804747.235%5Ev43%5Epc_blog_bottom_relevance_base7'>
				<div class="desc ellipsis-online ellipsis-online-1"><em>类</em>的声明<em>中</em>必须包含Q_OBJECT宏信号只需要声明不需要实现函数实体发射信号使用emit关键字自定义槽函数的实现与普通成员函数的实现方式一样2）槽函数声明方式示例Q_OBJECTpublic slots : //槽函数声明的标志 void pushButton_click<em>ed</em>();//声明槽函数 signals : void valuestring();//信号的声明 void valueChange(int newValue);//带参数的声明 private :};</div>
			</a>
		</div>
	</div>
</div>
<div class="recommend-item-box type_blog clearfix" data-url="https://blog.csdn.net/caoshangpa/article/details/135023483"  data-report-view='{"ab":"new","spm":"1001.2101.3001.6650.16","mod":"popu_387","extra":"{\"highlightScore\":0.0,\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~OPENSEARCH~RRF-16-135023483-blog-49804747.235^v43^pc_blog_bottom_relevance_base7\",\"dist_request_id\":\"1733930486580_55075\"}","dist_request_id":"1733930486580_55075","ab_strategy":"landingbge_opensearch_vector_rrf_v2","index":"16","strategy":"2~default~OPENSEARCH~RRF","dest":"https://blog.csdn.net/caoshangpa/article/details/135023483"}'>
	<div class="content-box">
		<div class="content-blog display-flex">
			<div class="title-box">
				<a href="https://blog.csdn.net/caoshangpa/article/details/135023483" class="tit" target="_blank"  data-report-click='{"ab":"new","spm":"1001.2101.3001.6650.16","mod":"popu_387","extra":"{\"highlightScore\":0.0,\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~OPENSEARCH~RRF-16-135023483-blog-49804747.235^v43^pc_blog_bottom_relevance_base7\",\"dist_request_id\":\"1733930486580_55075\"}","dist_request_id":"1733930486580_55075","ab_strategy":"landingbge_opensearch_vector_rrf_v2","index":"16","strategy":"2~default~OPENSEARCH~RRF","dest":"https://blog.csdn.net/caoshangpa/article/details/135023483"}'  data-report-query='spm=1001.2101.3001.6650.16&utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EOPENSEARCH%7ERRF-16-135023483-blog-49804747.235%5Ev43%5Epc_blog_bottom_relevance_base7&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EOPENSEARCH%7ERRF-16-135023483-blog-49804747.235%5Ev43%5Epc_blog_bottom_relevance_base7'>
					<div class="left ellipsis-online ellipsis-online-1"><em>Qt</em>基础之四十二：Q<em>Map</em>、Q<em>Hash</em>的实现原理和性能对比</div>
				</a>
			</div>
			<div class="info-box display-flex">
				<div class="info">
					<a href="https://blog.csdn.net/caoshangpa" target="_blank"><span class="blog-title">草上爬的博客</span></a>
				</div>
				<div class="info display-flex">
					<span class="info-block time">12-15</span>
					<span class="info-block read"><img class="read-img" src="https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png" alt="">
					5262
					</span>
				</div>
			</div>
		</div>
		<div class="desc-box">
			<a href="https://blog.csdn.net/caoshangpa/article/details/135023483" target="_blank"  data-report-click='{"ab":"new","spm":"1001.2101.3001.6650.16","mod":"popu_387","extra":"{\"highlightScore\":0.0,\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~OPENSEARCH~RRF-16-135023483-blog-49804747.235^v43^pc_blog_bottom_relevance_base7\",\"dist_request_id\":\"1733930486580_55075\"}","dist_request_id":"1733930486580_55075","ab_strategy":"landingbge_opensearch_vector_rrf_v2","index":"16","strategy":"2~default~OPENSEARCH~RRF","dest":"https://blog.csdn.net/caoshangpa/article/details/135023483"}'  data-report-query='spm=1001.2101.3001.6650.16&utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EOPENSEARCH%7ERRF-16-135023483-blog-49804747.235%5Ev43%5Epc_blog_bottom_relevance_base7&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EOPENSEARCH%7ERRF-16-135023483-blog-49804747.235%5Ev43%5Epc_blog_bottom_relevance_base7'>
				<div class="desc ellipsis-online ellipsis-online-1">Q<em>Map</em>、Q<em>Hash</em>的实现原理和性能对比：红黑树，是一种二叉搜索树，但在每个结点上增加一个存储位<em>表</em>示结点的颜色，可以是R<em>ed</em>或Black。通过对任何一条从根到叶子的路径上各个结点着色方式的限制，红黑树确保没有一条路径会比其他路径长出俩倍，因而是接近平衡的。红黑树为了保证其最长路径<em>中</em>节点个数不会超过最短路径节点个数的两倍，具有以下五个特性：(1)每个结点不是红色就是黑色(2)根节点是黑色的(3)如果一个节点是红色的，则它的两个孩子结点是黑色的。</div>
			</a>
		</div>
	</div>
</div>
<div class="recommend-item-box type_blog clearfix" data-url="https://blog.csdn.net/chenlichenforlinux21/article/details/135075001"  data-report-view='{"ab":"new","spm":"1001.2101.3001.6650.17","mod":"popu_387","extra":"{\"highlightScore\":0.0,\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~BlogCommendFromBaidu~Rate-17-135075001-blog-49804747.235^v43^pc_blog_bottom_relevance_base7\",\"dist_request_id\":\"1733930486580_55075\"}","dist_request_id":"1733930486580_55075","ab_strategy":"landingbge_opensearch_vector_rrf_v2","index":"17","strategy":"2~default~BlogCommendFromBaidu~Rate","dest":"https://blog.csdn.net/chenlichenforlinux21/article/details/135075001"}'>
	<div class="content-box">
		<div class="content-blog display-flex">
			<div class="title-box">
				<a href="https://blog.csdn.net/chenlichenforlinux21/article/details/135075001" class="tit" target="_blank"  data-report-click='{"ab":"new","spm":"1001.2101.3001.6650.17","mod":"popu_387","extra":"{\"highlightScore\":0.0,\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~BlogCommendFromBaidu~Rate-17-135075001-blog-49804747.235^v43^pc_blog_bottom_relevance_base7\",\"dist_request_id\":\"1733930486580_55075\"}","dist_request_id":"1733930486580_55075","ab_strategy":"landingbge_opensearch_vector_rrf_v2","index":"17","strategy":"2~default~BlogCommendFromBaidu~Rate","dest":"https://blog.csdn.net/chenlichenforlinux21/article/details/135075001"}'  data-report-query='spm=1001.2101.3001.6650.17&utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7ERate-17-135075001-blog-49804747.235%5Ev43%5Epc_blog_bottom_relevance_base7&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7ERate-17-135075001-blog-49804747.235%5Ev43%5Epc_blog_bottom_relevance_base7'>
					<div class="left ellipsis-online ellipsis-online-1"><em>QT</em>第十十一课程笔记 - <em>数组</em>和练习</div>
				</a>
			</div>
			<div class="info-box display-flex">
				<div class="info">
					<a href="https://blog.csdn.net/chenlichenforlinux21" target="_blank"><span class="blog-title">chenlichenforlinux21的博客</span></a>
				</div>
				<div class="info display-flex">
					<span class="info-block time">12-19</span>
					<span class="info-block read"><img class="read-img" src="https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png" alt="">
					801
					</span>
				</div>
			</div>
		</div>
		<div class="desc-box">
			<a href="https://blog.csdn.net/chenlichenforlinux21/article/details/135075001" target="_blank"  data-report-click='{"ab":"new","spm":"1001.2101.3001.6650.17","mod":"popu_387","extra":"{\"highlightScore\":0.0,\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~BlogCommendFromBaidu~Rate-17-135075001-blog-49804747.235^v43^pc_blog_bottom_relevance_base7\",\"dist_request_id\":\"1733930486580_55075\"}","dist_request_id":"1733930486580_55075","ab_strategy":"landingbge_opensearch_vector_rrf_v2","index":"17","strategy":"2~default~BlogCommendFromBaidu~Rate","dest":"https://blog.csdn.net/chenlichenforlinux21/article/details/135075001"}'  data-report-query='spm=1001.2101.3001.6650.17&utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7ERate-17-135075001-blog-49804747.235%5Ev43%5Epc_blog_bottom_relevance_base7&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7ERate-17-135075001-blog-49804747.235%5Ev43%5Epc_blog_bottom_relevance_base7'>
				<div class="desc ellipsis-online ellipsis-online-1">在 C++ <em>中</em>，<em>数组</em>是一种存储固定大小的相同<em>类</em>型元素的序列。<em>数组</em>的所有元素都存储在连续的内存位置上。这种数据结构非常适合于存储具有固定数量和相同数据<em>类</em>型的元素集合。您可以通过指定索引来访问<em>数组</em><em>中</em>的元素。<em>数组</em>索引是从 0 开始的，所以<em>数组</em>的第一个元素是。加入Lambda<em>表</em>达式和回调函数的做法（例如，声明一个<em>类</em>型为。</div>
			</a>
		</div>
	</div>
</div>
<div class="recommend-item-box type_blog clearfix" data-url="https://blog.csdn.net/nchu_zhangyiqing/article/details/111871693"  data-report-view='{"ab":"new","spm":"1001.2101.3001.6650.18","mod":"popu_387","extra":"{\"highlightScore\":0.0,\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~BlogCommendFromBaidu~Rate-18-111871693-blog-49804747.235^v43^pc_blog_bottom_relevance_base7\",\"dist_request_id\":\"1733930486580_55075\"}","dist_request_id":"1733930486580_55075","ab_strategy":"landingbge_opensearch_vector_rrf_v2","index":"18","strategy":"2~default~BlogCommendFromBaidu~Rate","dest":"https://blog.csdn.net/nchu_zhangyiqing/article/details/111871693"}'>
	<div class="content-box">
		<div class="content-blog display-flex">
			<div class="title-box">
				<a href="https://blog.csdn.net/nchu_zhangyiqing/article/details/111871693" class="tit" target="_blank"  data-report-click='{"ab":"new","spm":"1001.2101.3001.6650.18","mod":"popu_387","extra":"{\"highlightScore\":0.0,\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~BlogCommendFromBaidu~Rate-18-111871693-blog-49804747.235^v43^pc_blog_bottom_relevance_base7\",\"dist_request_id\":\"1733930486580_55075\"}","dist_request_id":"1733930486580_55075","ab_strategy":"landingbge_opensearch_vector_rrf_v2","index":"18","strategy":"2~default~BlogCommendFromBaidu~Rate","dest":"https://blog.csdn.net/nchu_zhangyiqing/article/details/111871693"}'  data-report-query='spm=1001.2101.3001.6650.18&utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7ERate-18-111871693-blog-49804747.235%5Ev43%5Epc_blog_bottom_relevance_base7&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7ERate-18-111871693-blog-49804747.235%5Ev43%5Epc_blog_bottom_relevance_base7'>
					<div class="left ellipsis-online ellipsis-online-1"><em>Qt</em>使用<em>数组</em>实现控件批处理</div>
				</a>
			</div>
			<div class="info-box display-flex">
				<div class="info">
					<a href="https://blog.csdn.net/nchu_zhangyiqing" target="_blank"><span class="blog-title">阿清的随手记</span></a>
				</div>
				<div class="info display-flex">
					<span class="info-block time">12-28</span>
					<span class="info-block read"><img class="read-img" src="https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png" alt="">
					4956
					</span>
				</div>
			</div>
		</div>
		<div class="desc-box">
			<a href="https://blog.csdn.net/nchu_zhangyiqing/article/details/111871693" target="_blank"  data-report-click='{"ab":"new","spm":"1001.2101.3001.6650.18","mod":"popu_387","extra":"{\"highlightScore\":0.0,\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~BlogCommendFromBaidu~Rate-18-111871693-blog-49804747.235^v43^pc_blog_bottom_relevance_base7\",\"dist_request_id\":\"1733930486580_55075\"}","dist_request_id":"1733930486580_55075","ab_strategy":"landingbge_opensearch_vector_rrf_v2","index":"18","strategy":"2~default~BlogCommendFromBaidu~Rate","dest":"https://blog.csdn.net/nchu_zhangyiqing/article/details/111871693"}'  data-report-query='spm=1001.2101.3001.6650.18&utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7ERate-18-111871693-blog-49804747.235%5Ev43%5Epc_blog_bottom_relevance_base7&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7ERate-18-111871693-blog-49804747.235%5Ev43%5Epc_blog_bottom_relevance_base7'>
				<div class="desc ellipsis-online ellipsis-online-1"><em>Qt</em>使用<em>数组</em>实现控件批处理
在<em>Qt</em><em>中</em>，当你需要对多个控件进行批处理操作时，使用控件<em>数组</em>会大大简化你的代码量。
例如希望在一个页面<em>中</em>创建一个控件<em>数组</em>，其<em>中</em>包含8条控件集合。控件<em>数组</em>的定义如下：
QCheckBox *checkbox[8];
QLabel *name[8];
QLabel *ID[8];
QPushButton *userDelBtn[8];
QPushButton *user<em>Ed</em>tBtn[8];

然后在你的cpp<em>中</em>使用循环，将它们实例化。
for(int i = 0; i &lt; 8; </div>
			</a>
		</div>
	</div>
</div>
              </div>
<div class="blog-footer-bottom" style="margin-top:10px;"></div>
<script src="https://g.csdnimg.cn/common/csdn-footer/csdn-footer.js" data-isfootertrack="false" type="text/javascript"></script>
<script type="text/javascript">
    window.csdn.csdnFooter.options = {
        el: '.blog-footer-bottom',
        type: 2
    }
</script>          </main>
<aside class="blog_container_aside">
<div id="asideProfile" class="aside-box">
    <div class="profile-intro d-flex">
        <div class="avatar-box d-flex justify-content-center flex-column">
            <a href="https://blog.csdn.net/senkkes" target="_blank" data-report-click='{"mod":"popu_379","spm":"1001.2101.3001.4121","dest":"https://blog.csdn.net/senkkes","ab":"new"}'>
                <img src="https://profile-avatar.csdnimg.cn/3e35cd7496874e929dd848d757703318_senkkes.jpg!1" class="avatar_pic">
            </a>
        </div>
        <div class="user-info d-flex flex-column profile-intro-name-box">
            <div class="profile-intro-name-boxTop">
                <a href="https://blog.csdn.net/senkkes" target="_blank" class="" id="uid" title="senkkes" data-report-click='{"mod":"popu_379","spm":"1001.2101.3001.4122","dest":"https://blog.csdn.net/senkkes","ab":"new"}'>
                    <span class="name " username="senkkes">senkkes</span>
                </a>
                <span>
                </span>
                <span class="flag expert-blog">
                <span class="bubble">CSDN认证博客专家</span>
                </span>
                <span class="flag company-blog">
                <span class="bubble">CSDN认证企业博客</span>
                </span>
            </div>
            <div class="profile-intro-name-boxFooter">
                <span class="personal-home-page personal-home-years" title="已加入 CSDN 10年">码龄10年</span>
                    <span class="personal-home-page">
                    <a class="personal-home-certification" href="https://i.csdn.net/#/uc/profile?utm_source=14998968" target="_blank" title="暂无认证">
                    <img src="https://csdnimg.cn/identity/nocErtification.png" alt="">
                    暂无认证
                    </a>
                    </span>
            </div>
        </div>
    </div>
    <div class="data-info d-flex item-tiling">
        <dl class="text-center" title="20">
            <a href="https://blog.csdn.net/senkkes" data-report-click='{"mod":"1598321000_001","spm":"1001.2101.3001.4310"}' data-report-query="t=1">  
                <dt><span class="count">20</span></dt>
                <dd class="font">原创</dd>
            </a>
        </dl>
        <dl class="text-center" data-report-click='{"mod":"1598321000_002","spm":"1001.2101.3001.4311"}' title="144513">
            <a href="https://blog.csdn.net/rank/list/weekly" target="_blank">
                <dt><span class="count">14万+</span></dt>
                <dd class="font">周排名</dd>
            </a>
        </dl>
        <dl class="text-center" title="555806">
            <a href="https://blog.csdn.net/rank/list/total" data-report-click='{"mod":"1598321000_003","spm":"1001.2101.3001.4312"}' target="_blank">
                <dt><span class="count">55万+</span></dt>
                <dd class="font">总排名</dd>
            </a>
        </dl>
        <dl class="text-center" style="min-width:58px" title="152107">  
            <dt><span class="count">15万+</span></dt>
            <dd>访问</dd>
        </dl>
        <dl class="text-center" title="5级,点击查看等级说明">
            <dt><a href="https://blog.csdn.net/blogdevteam/article/details/103478461" target="_blank">
                <img class="level" src="https://csdnimg.cn/identity/blog5.png">
            </a>
            </dt>
            <dd>等级</dd>
        </dl>
    </div>
    <div class="item-rank"></div>
    <div class="data-info d-flex item-tiling">
        <dl class="text-center" title="1748">
            <dt><span class="count">1748</span></dt>
            <dd>积分</dd>
        </dl>
         <dl class="text-center" id="fanBox" title="19">
            <dt><span class="count" id="fan">19</span></dt>
            <dd>粉丝</dd>
        </dl>
        <dl class="text-center" title="29">
            <dt><span class="count">29</span></dt>
            <dd>获赞</dd>
        </dl>
        <dl class="text-center" title="19">
            <dt><span class="count">19</span></dt>
            <dd>评论</dd>
        </dl>
        <dl class="text-center" title="161">
            <dt><span class="count">161</span></dt>
            <dd>收藏</dd>
        </dl>
    </div>
    <div class="aside-box-footer" data-report-view='{"spm":"3001.4296"}'>
        <div class="badge-box d-flex">
            <div class="badge d-flex">
                <div class="icon-badge" title="分享达人">
                    <div class="mouse-box">
                        <img class="medal-img" data-report-click='{"spm":"3001.4296"}' src="https://csdnimg.cn/medal/fenxiangdaren@240.png" alt="分享达人">
                    </div>
                </div>
                <div class="icon-badge" title="持续创作">
                    <div class="mouse-box">
                        <img class="medal-img" data-report-click='{"spm":"3001.4296"}' src="https://csdnimg.cn/medal/chizhiyiheng@240.png" alt="持续创作">
                    </div>
                </div>
                <div class="icon-badge" title="创作能手">
                    <div class="mouse-box">
                        <img class="medal-img" data-report-click='{"spm":"3001.4296"}' src="https://csdnimg.cn/medal/qixiebiaobing4@240.png" alt="创作能手">
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="profile-intro-name-boxOpration">
        <div class="opt-letter-watch-box">
        <a rel="nofollow" class="bt-button personal-letter" href="https://im.csdn.net/chat/senkkes" target="_blank" rel="noopener">私信</a>
        </div>
        <div class="opt-letter-watch-box"> 
            <a class="personal-watch bt-button" id="btnAttent" >关注</a>  
        </div>
    </div>
</div>
<a id="remuneration" data-report-click='{"spm":"1001.2101.3001.9809"}' rel="nofollow" href="" class="remuneration-box">
  <img src="" alt="">
</a>
  <div id="asideWriteGuide" class="aside-box side-write-guide-box type-2" data-report-view='{"spm":"3001.9727"}'>
    <div class="content-box">
      <a rel="nofollow" href="https://edu.csdn.net/cloud/houjie?utm_source=hjblogllq" target="_blank" class="btn-go-write" data-report-query="spm=3001.9727" data-report-click='{"spm":"3001.9727"}'>
        <img src="https://img-home.csdnimg.cn/images/20241211120142.jpg" alt="写文章">
      </a>
    </div>
  </div>
<div id="asideSearchArticle" class="aside-box">
	<div class="aside-content search-comter">
    <div class="aside-search aside-search-blog">         
        <input type="text" class="input-serch-blog" name="" autocomplete="off" value="" id="search-blog-words" placeholder="搜博主文章">
        <a class="btn-search-blog" data-report-click='{"spm":"1001.2101.3001.9182"}'>
            <img src="//csdnimg.cn/cdn/content-toolbar/csdn-sou.png?v=1587021042">
        </a>
    </div>
    </div>
</div>



<div id="asideHotArticle" class="aside-box">
	<h3 class="aside-title">热门文章</h3>
	<div class="aside-content">
		<ul class="hotArticle-list">
			<li>
				<a href="https://blog.csdn.net/senkkes/article/details/50357492" target="_blank"  data-report-click='{"mod":"popu_541","spm":"1001.2101.3001.4139","dest":"https://blog.csdn.net/senkkes/article/details/50357492","ab":"new"}'>
				qt中的lineEdit文本输入框的输入类型限制(三种验证类)
					<img src="https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png" alt="">
					<span class="read">13014</span>
                </a>
			</li>
			<li>
				<a href="https://blog.csdn.net/senkkes/article/details/52786192" target="_blank"  data-report-click='{"mod":"popu_541","spm":"1001.2101.3001.4139","dest":"https://blog.csdn.net/senkkes/article/details/52786192","ab":"new"}'>
				ubuntu下QtCreator启动无响应问题解决
					<img src="https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png" alt="">
					<span class="read">10074</span>
                </a>
			</li>
			<li>
				<a href="https://blog.csdn.net/senkkes/article/details/70268089" target="_blank"  data-report-click='{"mod":"popu_541","spm":"1001.2101.3001.4139","dest":"https://blog.csdn.net/senkkes/article/details/70268089","ab":"new"}'>
				Qt下双屏的显示方法
					<img src="https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png" alt="">
					<span class="read">9098</span>
                </a>
			</li>
			<li>
				<a href="https://blog.csdn.net/senkkes/article/details/50890172" target="_blank"  data-report-click='{"mod":"popu_541","spm":"1001.2101.3001.4139","dest":"https://blog.csdn.net/senkkes/article/details/50890172","ab":"new"}'>
				Qt 自定义控件应用QSS（setStyleSheet）设置由Q_PROPERTY设置的属性
					<img src="https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png" alt="">
					<span class="read">8378</span>
                </a>
			</li>
			<li>
				<a href="https://blog.csdn.net/senkkes/article/details/49804267" target="_blank"  data-report-click='{"mod":"popu_541","spm":"1001.2101.3001.4139","dest":"https://blog.csdn.net/senkkes/article/details/49804267","ab":"new"}'>
				Qt Creator 3.5.1(Qt4.8.4库+MinGW4.4）下不能调试问题解决（Debugging has failed）
					<img src="https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png" alt="">
					<span class="read">8248</span>
                </a>
			</li>
		</ul>
	</div>
</div>
<div id="asideCategory" class="aside-box flexible-box">
    <h3 class="aside-title">分类专栏</h3>
    <div class="aside-content">
        <ul>
            <li>
                <a class="clearfix special-column-name"  href="https://blog.csdn.net/senkkes/category_11164126.html" data-report-click='{"mod":"popu_537","spm":"1001.2101.3001.4137","strategy":"pc付费专栏左侧入口","dest":"https://blog.csdn.net/senkkes/category_11164126.html","ab":"new"}'>
                    <div class="special-column-bar "></div>
                    <img src="https://i-blog.csdnimg.cn/columns/default/20201014180756738.png?x-oss-process=image/resize,m_fixed,h_64,w_64" alt="" onerror="this.src='https://i-blog.csdnimg.cn/columns/default/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64'">
                    <span class="title oneline">
                        Django
                    </span>
                </a>
                <span class="special-column-num">3篇</span>
            </li>
            <li>
                <a class="clearfix special-column-name"  href="https://blog.csdn.net/senkkes/category_11164333.html" data-report-click='{"mod":"popu_537","spm":"1001.2101.3001.4137","strategy":"pc付费专栏左侧入口","dest":"https://blog.csdn.net/senkkes/category_11164333.html","ab":"new"}'>
                    <div class="special-column-bar "></div>
                    <img src="https://i-blog.csdnimg.cn/columns/default/20201014180756754.png?x-oss-process=image/resize,m_fixed,h_64,w_64" alt="" onerror="this.src='https://i-blog.csdnimg.cn/columns/default/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64'">
                    <span class="title oneline">
                        MySQL
                    </span>
                </a>
                <span class="special-column-num">2篇</span>
            </li>
            <li>
                <a class="clearfix special-column-name"  href="https://blog.csdn.net/senkkes/category_11503731.html" data-report-click='{"mod":"popu_537","spm":"1001.2101.3001.4137","strategy":"pc付费专栏左侧入口","dest":"https://blog.csdn.net/senkkes/category_11503731.html","ab":"new"}'>
                    <div class="special-column-bar "></div>
                    <img src="https://i-blog.csdnimg.cn/columns/default/20201014180756930.png?x-oss-process=image/resize,m_fixed,h_64,w_64" alt="" onerror="this.src='https://i-blog.csdnimg.cn/columns/default/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64'">
                    <span class="title oneline">
                        Vue.js
                    </span>
                </a>
                <span class="special-column-num">1篇</span>
            </li>
            <li>
                <a class="clearfix special-column-name"  href="https://blog.csdn.net/senkkes/category_11495378.html" data-report-click='{"mod":"popu_537","spm":"1001.2101.3001.4137","strategy":"pc付费专栏左侧入口","dest":"https://blog.csdn.net/senkkes/category_11495378.html","ab":"new"}'>
                    <div class="special-column-bar "></div>
                    <img src="https://i-blog.csdnimg.cn/columns/default/20201014180756918.png?x-oss-process=image/resize,m_fixed,h_64,w_64" alt="" onerror="this.src='https://i-blog.csdnimg.cn/columns/default/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64'">
                    <span class="title oneline">
                        wepy
                    </span>
                </a>
                <span class="special-column-num">1篇</span>
            </li>
            <li>
                <a class="clearfix special-column-name"  href="https://blog.csdn.net/senkkes/category_5917437.html" data-report-click='{"mod":"popu_537","spm":"1001.2101.3001.4137","strategy":"pc付费专栏左侧入口","dest":"https://blog.csdn.net/senkkes/category_5917437.html","ab":"new"}'>
                    <div class="special-column-bar "></div>
                    <img src="https://i-blog.csdnimg.cn/columns/default/20201014180756754.png?x-oss-process=image/resize,m_fixed,h_64,w_64" alt="" onerror="this.src='https://i-blog.csdnimg.cn/columns/default/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64'">
                    <span class="title oneline">
                        Qt知识点
                    </span>
                </a>
                <span class="special-column-num">19篇</span>
            </li>
            <li>
                <a class="clearfix special-column-name"  href="https://blog.csdn.net/senkkes/category_5917439.html" data-report-click='{"mod":"popu_537","spm":"1001.2101.3001.4137","strategy":"pc付费专栏左侧入口","dest":"https://blog.csdn.net/senkkes/category_5917439.html","ab":"new"}'>
                    <div class="special-column-bar "></div>
                    <img src="https://i-blog.csdnimg.cn/columns/default/20201014180756724.png?x-oss-process=image/resize,m_fixed,h_64,w_64" alt="" onerror="this.src='https://i-blog.csdnimg.cn/columns/default/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64'">
                    <span class="title oneline">
                        Qt经典示例
                    </span>
                </a>
                <span class="special-column-num">4篇</span>
            </li>
        </ul>
    </div>
    <p class="text-center">
        <a class="flexible-btn" data-fbox="aside-archive"><img class="look-more" src="https://csdnimg.cn/release/blogv2/dist/pc/img/arrowDownWhite.png" alt=""></a>
    </p>
</div>
<div id="asideNewComments" class="aside-box">
    <h3 class="aside-title">最新评论</h3>
    <div class="aside-content">
        <ul class="newcomment-list">
            <li>
                <a class="title text-truncate" target="_blank" href="https://blog.csdn.net/senkkes/article/details/50339015#comments_26352483" data-report-click='{"mod":"popu_542","spm":"1001.2101.3001.4231","dest":"https://blog.csdn.net/senkkes/article/details/50339015#comments_26352483","ab":"new"}' data-report-view='{"mod":"popu_542","spm":"1001.2101.3001.4231","dest":"https://blog.csdn.net/senkkes/article/details/50339015#comments_26352483","ab":"new"}'>Qt4.8.5下 Qtserialport 安装中找不到cfgmgr32.h的解决</a>
                <p class="comment ellipsis">
                    <a href="https://blog.csdn.net/pyq1518186024" class="user-name" target="_blank">pyq1518186024: </a>
                    <span class="code-comments">大佬我现在是4.8.7版本，遇到和这个一样的问题，这个链接失效了，还有没有其他链接，或者将文件发我一下</span>
                </p>
            </li>
            <li>
                <a class="title text-truncate" target="_blank" href="https://blog.csdn.net/senkkes/article/details/71055128#comments_23277028" data-report-click='{"mod":"popu_542","spm":"1001.2101.3001.4231","dest":"https://blog.csdn.net/senkkes/article/details/71055128#comments_23277028","ab":"new"}' data-report-view='{"mod":"popu_542","spm":"1001.2101.3001.4231","dest":"https://blog.csdn.net/senkkes/article/details/71055128#comments_23277028","ab":"new"}'>mingw编译Qtcreator</a>
                <p class="comment ellipsis">
                    <a href="https://blog.csdn.net/qq_44257593" class="user-name" target="_blank">塞伦盖蒂_: </a>
                    <span class="code-comments">我想说这个Qt库源码那里的bin目录啊？楼主能不能写清楚，还是说Qt安装包里面的那个bin目录</span>
                </p>
            </li>
            <li>
                <a class="title text-truncate" target="_blank" href="https://blog.csdn.net/senkkes/article/details/50898551#comments_19172304" data-report-click='{"mod":"popu_542","spm":"1001.2101.3001.4231","dest":"https://blog.csdn.net/senkkes/article/details/50898551#comments_19172304","ab":"new"}' data-report-view='{"mod":"popu_542","spm":"1001.2101.3001.4231","dest":"https://blog.csdn.net/senkkes/article/details/50898551#comments_19172304","ab":"new"}'>Qt多国语言的实现与切换（国际化）</a>
                <p class="comment ellipsis">
                    <a href="https://blog.csdn.net/lanmanck" class="user-name" target="_blank">#Page#: </a>
                    <span class="code-comments">最后一段话只在 load(uchar*dat,int len)这个函数中，其他load()也没说</span>
                </p>
            </li>
            <li>
                <a class="title text-truncate" target="_blank" href="https://blog.csdn.net/senkkes/article/details/70268089#comments_16293067" data-report-click='{"mod":"popu_542","spm":"1001.2101.3001.4231","dest":"https://blog.csdn.net/senkkes/article/details/70268089#comments_16293067","ab":"new"}' data-report-view='{"mod":"popu_542","spm":"1001.2101.3001.4231","dest":"https://blog.csdn.net/senkkes/article/details/70268089#comments_16293067","ab":"new"}'>Qt下双屏的显示方法</a>
                <p class="comment ellipsis">
                    <a href="https://letmefly.blog.csdn.net" class="user-name" target="_blank">Tisfy: </a>
                    <span class="code-comments">我曾经流连于宋元的词曲，但刚发现此文甚妙！</span>
                </p>
            </li>
            <li>
                <a class="title text-truncate" target="_blank" href="https://blog.csdn.net/senkkes/article/details/70268089#comments_14390294" data-report-click='{"mod":"popu_542","spm":"1001.2101.3001.4231","dest":"https://blog.csdn.net/senkkes/article/details/70268089#comments_14390294","ab":"new"}' data-report-view='{"mod":"popu_542","spm":"1001.2101.3001.4231","dest":"https://blog.csdn.net/senkkes/article/details/70268089#comments_14390294","ab":"new"}'>Qt下双屏的显示方法</a>
                <p class="comment ellipsis">
                    <a href="https://blog.csdn.net/weixin_51698428" class="user-name" target="_blank">忘尘-小白: </a>
                    <span class="code-comments">你好，我问一下，我用你的哪行代码检测出来N是一，这是什么原因，我链接了两个显示屏呢</span>
                </p>
            </li>
        </ul>
    </div>
</div>
<div id="asideHotArticle" class="aside-box">
	<h3 class="aside-title">大家在看</h3>
	<div class="aside-content">
		<ul class="hotArticle-list">
			<li>
				<a href="https://blog.csdn.net/qq_42878414/article/details/144412363" target="_blank"  data-report-click='{"spm":"1001.2101.3001.10093","dest":"https://blog.csdn.net/qq_42878414/article/details/144412363","strategy":"202_1052723-2130769_RCMD","ab":"new"}' data-report-view='{"spm":"1001.2101.3001.10093","dest":"https://blog.csdn.net/qq_42878414/article/details/144412363","strategy":"202_1052723-2130769_RCMD","ab":"new"}'>
				搜索广告召回技术在美团的实践
        </a>
			</li>
			<li>
				<a href="https://blog.csdn.net/2303_77648069/article/details/144408538" target="_blank"  data-report-click='{"spm":"1001.2101.3001.10093","dest":"https://blog.csdn.net/2303_77648069/article/details/144408538","strategy":"202_1052723-2130750_RCMD","ab":"new"}' data-report-view='{"spm":"1001.2101.3001.10093","dest":"https://blog.csdn.net/2303_77648069/article/details/144408538","strategy":"202_1052723-2130750_RCMD","ab":"new"}'>
				代码随想录算法日记day15 | 110.平衡二叉树、257. 二叉树的所有路径、404.左叶子之和、 222.完全二叉树的节点个数
        </a>
			</li>
			<li>
				<a href="https://blog.csdn.net/weixin_56261190/article/details/144383982" target="_blank"  data-report-click='{"spm":"1001.2101.3001.10093","dest":"https://blog.csdn.net/weixin_56261190/article/details/144383982","strategy":"202_1052723-2130629_RCMD","ab":"new"}' data-report-view='{"spm":"1001.2101.3001.10093","dest":"https://blog.csdn.net/weixin_56261190/article/details/144383982","strategy":"202_1052723-2130629_RCMD","ab":"new"}'>
				c语言基础——关键字static,const,extern 堆栈，动态分配malloc，类型重定义typedef，宏定义define
					<img src="https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png" alt="">
					<span class="read">428</span>
        </a>
			</li>
			<li>
				<a href="https://blog.csdn.net/weixin_43050480/article/details/144344932" target="_blank"  data-report-click='{"spm":"1001.2101.3001.10093","dest":"https://blog.csdn.net/weixin_43050480/article/details/144344932","strategy":"202_1052723-2130786_RCMD","ab":"new"}' data-report-view='{"spm":"1001.2101.3001.10093","dest":"https://blog.csdn.net/weixin_43050480/article/details/144344932","strategy":"202_1052723-2130786_RCMD","ab":"new"}'>
				C# 增删改查Mongo数据库的窗体
					<img src="https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png" alt="">
					<span class="read">331</span>
        </a>
			</li>
			<li>
				<a href="https://blog.csdn.net/weixin_44217688/article/details/144412340" target="_blank"  data-report-click='{"spm":"1001.2101.3001.10093","dest":"https://blog.csdn.net/weixin_44217688/article/details/144412340","strategy":"202_1052723-2130712_RCMD","ab":"new"}' data-report-view='{"spm":"1001.2101.3001.10093","dest":"https://blog.csdn.net/weixin_44217688/article/details/144412340","strategy":"202_1052723-2130712_RCMD","ab":"new"}'>
				「Mac玩转仓颉内测版50」小学奥数篇13 - 动态规划入门
        </a>
			</li>
		</ul>
	</div>
</div>
<div id="asideArchive" class="aside-box" style="display:block!important; width:300px;">
    <h3 class="aside-title">最新文章</h3>
    <div class="aside-content">
        <ul class="inf_list clearfix">
            <li class="clearfix">
            <a href="https://blog.csdn.net/senkkes/article/details/123157927" target="_blank" data-report-click='{"mod":"popu_382","spm":"1001.2101.3001.4136","dest":"https://blog.csdn.net/senkkes/article/details/123157927","ab":"new"}' data-report-view='{"mod":"popu_382","dest":"https://blog.csdn.net/senkkes/article/details/123157927","ab":"new"}'>腾讯云部署Django+Nginx+uWSGI+SimpleUI</a>
            </li>
            <li class="clearfix">
            <a href="https://blog.csdn.net/senkkes/article/details/123157769" target="_blank" data-report-click='{"mod":"popu_382","spm":"1001.2101.3001.4136","dest":"https://blog.csdn.net/senkkes/article/details/123157769","ab":"new"}' data-report-view='{"mod":"popu_382","dest":"https://blog.csdn.net/senkkes/article/details/123157769","ab":"new"}'>腾讯云部署Django+uWSGI+SimpleUI时.svg文件无法显示</a>
            </li>
            <li class="clearfix">
            <a href="https://blog.csdn.net/senkkes/article/details/122250664" target="_blank" data-report-click='{"mod":"popu_382","spm":"1001.2101.3001.4136","dest":"https://blog.csdn.net/senkkes/article/details/122250664","ab":"new"}' data-report-view='{"mod":"popu_382","dest":"https://blog.csdn.net/senkkes/article/details/122250664","ab":"new"}'>mySql 数据库导出</a>
            </li>
        </ul>
        <div class="archive-bar"></div>
        <div class="archive-box">
                <div class="archive-list-item"><a href="https://blog.csdn.net/senkkes?type=blog&amp;year=2022&amp;month=02" target="_blank" data-report-click='{"mod":"popu_538","spm":"1001.2101.3001.4138","ab":"new","dest":"https://blog.csdn.net/senkkes?type=blog&amp;year=2022&amp;month=02"}'><span class="year">2022年</span><span class="num">2篇</span></a></div>
                <div class="archive-list-item"><a href="https://blog.csdn.net/senkkes?type=blog&amp;year=2021&amp;month=12" target="_blank" data-report-click='{"mod":"popu_538","spm":"1001.2101.3001.4138","ab":"new","dest":"https://blog.csdn.net/senkkes?type=blog&amp;year=2021&amp;month=12"}'><span class="year">2021年</span><span class="num">7篇</span></a></div>
                <div class="archive-list-item"><a href="https://blog.csdn.net/senkkes?type=blog&amp;year=2017&amp;month=05" target="_blank" data-report-click='{"mod":"popu_538","spm":"1001.2101.3001.4138","ab":"new","dest":"https://blog.csdn.net/senkkes?type=blog&amp;year=2017&amp;month=05"}'><span class="year">2017年</span><span class="num">4篇</span></a></div>
                <div class="archive-list-item"><a href="https://blog.csdn.net/senkkes?type=blog&amp;year=2016&amp;month=12" target="_blank" data-report-click='{"mod":"popu_538","spm":"1001.2101.3001.4138","ab":"new","dest":"https://blog.csdn.net/senkkes?type=blog&amp;year=2016&amp;month=12"}'><span class="year">2016年</span><span class="num">11篇</span></a></div>
                <div class="archive-list-item"><a href="https://blog.csdn.net/senkkes?type=blog&amp;year=2015&amp;month=12" target="_blank" data-report-click='{"mod":"popu_538","spm":"1001.2101.3001.4138","ab":"new","dest":"https://blog.csdn.net/senkkes?type=blog&amp;year=2015&amp;month=12"}'><span class="year">2015年</span><span class="num">25篇</span></a></div>
        </div>
    </div>
</div>
	<div id="footerRightAds" class="isShowFooterAds">
		<div class="aside-box">
			<div id="kp_box_57" data-pid="57"><script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-1076724771190722"
     crossorigin="anonymous"></script>
<!-- PC-博客-详情页-左下视窗-0-49 -->
<ins class="adsbygoogle"
     style="display:block"
     data-ad-client="ca-pub-1076724771190722"
     data-ad-slot="4787882818"
     data-ad-format="auto"
     data-full-width-responsive="true"></ins>
<script>
     (adsbygoogle = window.adsbygoogle || []).push({});
</script><img class="pre-img-lasy" data-src="https://kunyu.csdn.net/1.png?p=57&adId=1048398&adBlockFlag=0&a=1048398&c=0&k=Qt中丰富的容器类---数组QVector、链表QLinkedList、映射表QMap、哈希表QHash&spm=1001.2101.3001.5001&articleId=49804747&d=1&t=3&u=a24c9fcf42924a699de09978bbfac8fe" style="display: block;width: 0px;height: 0px;"></div>
		</div>
	</div>
    <!-- 详情页显示目录 -->
<!--文章目录-->
<div id="asidedirectory" class="aside-box">
    <div class='groupfile' id="directory">
        <h3 class="aside-title">目录</h3>
        <div class="align-items-stretch group_item">
            <div class="pos-box">
            <div class="scroll-box">
                <div class="toc-box"></div>
            </div>
            </div>
        </div>
    </div>
</div>
</aside>
<script>
	$("a.flexible-btn").click(function(){
		$(this).parents('div.aside-box').removeClass('flexible-box');
		$(this).parents("p.text-center").remove();
	})
</script>
<script type="text/javascript"  src="https://g.csdnimg.cn/user-tooltip/2.7/user-tooltip.js"></script>
<script type="text/javascript"  src="https://g.csdnimg.cn/user-medal/2.0.0/user-medal.js"></script>        </div>
<div class="recommend-right align-items-stretch clearfix" id="rightAside" data-type="recommend">
    <aside class="recommend-right_aside">
        <div id="recommend-right" >
                            <div class="programmer1Box">
                      <div id="kp_box_530" data-pid="530"><script defer type="text/javascript" id="interactive_js_adcode" src="https://kunpeng-render.csdnimg.cn/publisher/latest/truereachAdRender.js"></script>
<div id="TR-780cc1b5-94d9-11ee-9cea-bf3fc95316dc"></div><img class="pre-img-lasy" data-src="https://kunyu.csdn.net/1.png?p=530&adId=1057732&adBlockFlag=0&a=1057732&c=0&k=Qt中丰富的容器类---数组QVector、链表QLinkedList、映射表QMap、哈希表QHash&spm=1001.2101.3001.4647&articleId=49804747&d=1&t=3&u=825b0a88ff7f4b51b52952ff259ef18b" style="display: block;width: 0px;height: 0px;"></div>
                  </div>
          <div class='flex-column aside-box groupfile' id="groupfile">
              <div class="groupfile-div">
              <h3 class="aside-title">目录</h3>
              <div class="align-items-stretch group_item">
                  <div class="pos-box">
                      <div class="scroll-box">
                          <div class="toc-box"></div>
                      </div>
                  </div>
              </div>
              </div>
          </div>
              <div id="recommendAdBox">
                  <div id="kp_box_479" data-pid="479"><div class="wwads-cn wwads-vertical" data-id="149" style="max-width:300px;margin-top:10px;margin-bottom:10px;background-color: #fff;"></div> 
<style>.wwads-img img {width: 150px; margin-top:10px}</style>
<script type="text/javascript" charset="UTF-8" src="https://cdn.wwads.cn/js/makemoney.js" async></script><img class="pre-img-lasy" data-src="https://kunyu.csdn.net/1.png?p=479&adId=1049278&adBlockFlag=0&a=1049278&c=0&k=Qt中丰富的容器类---数组QVector、链表QLinkedList、映射表QMap、哈希表QHash&spm=1001.2101.3001.4834&articleId=49804747&d=1&t=3&u=a347d4f77059484b9684645283738fa4" style="display: block;width: 0px;height: 0px;"></div>
              </div>
          <div class='aside-box kind_person d-flex flex-column'>
                  <h3 class="aside-title">分类专栏</h3>
                  <div class="align-items-stretch kindof_item" id="kind_person_column">
                      <div class="aside-content">
                          <ul>
                              <li>
                                  <a class="clearfix special-column-name"  href="https://blog.csdn.net/senkkes/category_11164126.html" data-report-click='{"mod":"popu_537","spm":"1001.2101.3001.4137","strategy":"pc付费专栏左侧入口","dest":"https://blog.csdn.net/senkkes/category_11164126.html","ab":"new"}'>
                                      <div class="special-column-bar "></div>
                                      <img src="https://i-blog.csdnimg.cn/columns/default/20201014180756738.png?x-oss-process=image/resize,m_fixed,h_64,w_64" alt="" onerror="this.src='https://i-blog.csdnimg.cn/columns/default/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64'">
                                      <span class="">
                                          Django
                                      </span>
                                  </a>
                                  <span class="special-column-num">3篇</span>
                              </li>
                              <li>
                                  <a class="clearfix special-column-name"  href="https://blog.csdn.net/senkkes/category_11164333.html" data-report-click='{"mod":"popu_537","spm":"1001.2101.3001.4137","strategy":"pc付费专栏左侧入口","dest":"https://blog.csdn.net/senkkes/category_11164333.html","ab":"new"}'>
                                      <div class="special-column-bar "></div>
                                      <img src="https://i-blog.csdnimg.cn/columns/default/20201014180756754.png?x-oss-process=image/resize,m_fixed,h_64,w_64" alt="" onerror="this.src='https://i-blog.csdnimg.cn/columns/default/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64'">
                                      <span class="">
                                          MySQL
                                      </span>
                                  </a>
                                  <span class="special-column-num">2篇</span>
                              </li>
                              <li>
                                  <a class="clearfix special-column-name"  href="https://blog.csdn.net/senkkes/category_11503731.html" data-report-click='{"mod":"popu_537","spm":"1001.2101.3001.4137","strategy":"pc付费专栏左侧入口","dest":"https://blog.csdn.net/senkkes/category_11503731.html","ab":"new"}'>
                                      <div class="special-column-bar "></div>
                                      <img src="https://i-blog.csdnimg.cn/columns/default/20201014180756930.png?x-oss-process=image/resize,m_fixed,h_64,w_64" alt="" onerror="this.src='https://i-blog.csdnimg.cn/columns/default/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64'">
                                      <span class="">
                                          Vue.js
                                      </span>
                                  </a>
                                  <span class="special-column-num">1篇</span>
                              </li>
                              <li>
                                  <a class="clearfix special-column-name"  href="https://blog.csdn.net/senkkes/category_11495378.html" data-report-click='{"mod":"popu_537","spm":"1001.2101.3001.4137","strategy":"pc付费专栏左侧入口","dest":"https://blog.csdn.net/senkkes/category_11495378.html","ab":"new"}'>
                                      <div class="special-column-bar "></div>
                                      <img src="https://i-blog.csdnimg.cn/columns/default/20201014180756918.png?x-oss-process=image/resize,m_fixed,h_64,w_64" alt="" onerror="this.src='https://i-blog.csdnimg.cn/columns/default/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64'">
                                      <span class="">
                                          wepy
                                      </span>
                                  </a>
                                  <span class="special-column-num">1篇</span>
                              </li>
                              <li>
                                  <a class="clearfix special-column-name"  href="https://blog.csdn.net/senkkes/category_5917437.html" data-report-click='{"mod":"popu_537","spm":"1001.2101.3001.4137","strategy":"pc付费专栏左侧入口","dest":"https://blog.csdn.net/senkkes/category_5917437.html","ab":"new"}'>
                                      <div class="special-column-bar "></div>
                                      <img src="https://i-blog.csdnimg.cn/columns/default/20201014180756754.png?x-oss-process=image/resize,m_fixed,h_64,w_64" alt="" onerror="this.src='https://i-blog.csdnimg.cn/columns/default/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64'">
                                      <span class="">
                                          Qt知识点
                                      </span>
                                  </a>
                                  <span class="special-column-num">19篇</span>
                              </li>
                              <li>
                                  <a class="clearfix special-column-name"  href="https://blog.csdn.net/senkkes/category_5917439.html" data-report-click='{"mod":"popu_537","spm":"1001.2101.3001.4137","strategy":"pc付费专栏左侧入口","dest":"https://blog.csdn.net/senkkes/category_5917439.html","ab":"new"}'>
                                      <div class="special-column-bar "></div>
                                      <img src="https://i-blog.csdnimg.cn/columns/default/20201014180756724.png?x-oss-process=image/resize,m_fixed,h_64,w_64" alt="" onerror="this.src='https://i-blog.csdnimg.cn/columns/default/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64'">
                                      <span class="">
                                          Qt经典示例
                                      </span>
                                  </a>
                                  <span class="special-column-num">4篇</span>
                              </li>
                          </ul>
                      </div>
                  </div>
          </div>
        </div>
    </aside>
</div>

<div class="recommend-right1  align-items-stretch clearfix" id="rightAsideConcision" data-type="recommend">
    <aside class="recommend-right_aside">
        <div id="recommend-right-concision" >
            <div class='flex-column aside-box groupfile' id="groupfileConcision">
                <div class="groupfile-div1">
                <h3 class="aside-title">目录</h3>
                <div class="align-items-stretch group_item">
                    <div class="pos-box">
                        <div class="scroll-box">
                            <div class="toc-box"></div>
                        </div>
                    </div>
                </div>
                </div>
            </div>
        </div>
    </aside>
</div>

      </div>
      <div class="mask-dark"></div>
      <div class="skin-boxshadow"></div>
      <div class="directory-boxshadow"></div>
<div class="comment-side-box-shadow comment-side-tit-close" id="commentSideBoxshadow">
<div class="comment-side-content">
	<div class="comment-side-tit">
		<span class="comment-side-tit-count">评论</span>	
	<img class="comment-side-tit-close" src="https://csdnimg.cn/release/blogv2/dist/pc/img/closeBt.png"></div>
	<div id="pcCommentSideBox" class="comment-box comment-box-new2 " style="display:block">
    <div class="comment-edit-box d-flex">
      <div class="user-img">
        <a href="https://blog.csdn.net/wj78080458" target="_blank">
          <img src="https://profile-avatar.csdnimg.cn/984ebdc3974f4ff99b27c3783e686b65_wj78080458.jpg!1">
        </a>
      </div>
      <form id="commentform">
        <textarea class="comment-content" name="comment_content" id="comment_content" placeholder="欢迎高质量的评论，低质的评论会被折叠" maxlength="1000"></textarea>
        <div class="comment-reward-box" style="background-image: url('https://img-home.csdnimg.cn/images/20230131025301.png');">
          <a class="btn-remove-reward"></a>
          <div class="form-reward-box">
            <div class="info">
              成就一亿技术人!
            </div>
            <div class="price-info">
              拼手气红包<span class="price">6.0元</span>
            </div>
          </div>
        </div>
        <div class="comment-operate-box">
          <div class="comment-operate-l">
            <span id="tip_comment" class="tip">还能输入<em>1000</em>个字符</span>
          </div>
          <div class="comment-operate-c">
            &nbsp;
          </div>
          <div class="comment-operate-r">
            <div class="comment-operate-item comment-reward">
              <img class="comment-operate-img" data-url="https://csdnimg.cn/release/blogv2/dist/pc/img/" src="https://csdnimg.cn/release/blogv2/dist/pc/img/commentReward.png" alt="红包">
              <span class="comment-operate-tip">添加红包</span>
            </div>
            <div class="comment-operate-item comment-emoticon">
              <img class="comment-operate-img" data-url="https://csdnimg.cn/release/blogv2/dist/pc/img/" src="https://csdnimg.cn/release/blogv2/dist/pc/img/commentEmotionIcon.png" alt="表情包">
              <span class="comment-operate-tip">插入表情</span>
              <div class="comment-emoticon-box comment-operate-isshow">
                <div class="comment-emoticon-img-box"></div>
              </div>
            </div>
            <div class="comment-operate-item comment-code">
              <img class="comment-operate-img" data-url="https://csdnimg.cn/release/blogv2/dist/pc/img/" src="https://csdnimg.cn/release/blogv2/dist/pc/img/commentCodeIcon.png" alt="表情包">
              <span class="comment-operate-tip">代码片</span>
              <div class="comment-code-box comment-operate-isshow">
                <ul id="commentCode">
                  <li><a data-code="html">HTML/XML</a></li>
                  <li><a data-code="objc">objective-c</a></li>
                  <li><a data-code="ruby">Ruby</a></li>
                  <li><a data-code="php">PHP</a></li>
                  <li><a data-code="csharp">C</a></li>
                  <li><a data-code="cpp">C++</a></li>
                  <li><a data-code="javascript">JavaScript</a></li>
                  <li><a data-code="python">Python</a></li>
                  <li><a data-code="java">Java</a></li>
                  <li><a data-code="css">CSS</a></li>
                  <li><a data-code="sql">SQL</a></li>
                  <li><a data-code="plain">其它</a></li>
                </ul>
              </div>
            </div>
            <div class="comment-operate-item">
              <input type="hidden" id="comment_replyId" name="comment_replyId">
              <input type="hidden" id="article_id" name="article_id" value="49804747">
              <input type="hidden" id="comment_userId" name="comment_userId" value="">
              <input type="hidden" id="commentId" name="commentId" value="">
              <a data-report-click='{"mod":"1582594662_003","spm":"1001.2101.3001.4227","ab":"new"}'>
              <input type="submit" class="btn-comment btn-comment-input" value="评论">
              </a>
            </div>
          </div>
        </div>
      </form>
    </div>
		<div class="comment-list-container">
			<div class="comment-list-box comment-operate-item">
			</div>
			<div id="lookFlodComment" class="look-flod-comment">
					<span class="count"></span>&nbsp;条评论被折叠&nbsp;<a class="look-more-flodcomment">查看</a>
			</div>
			<div class="opt-box text-center">
				<div class="btn btn-sm btn-link-blue" id="btnMoreComment"></div>
			</div>
		</div>
	</div>
	<div id="pcFlodCommentSideBox" class="pc-flodcomment-sidebox">
		<div class="comment-fold-tit"><span id="lookUnFlodComment" class="back"><img src="https://csdnimg.cn/release/blogv2/dist/pc/img/commentArrowLeftWhite.png" alt=""></span>被折叠的&nbsp;<span class="count"></span>&nbsp;条评论
		 <a href="https://blogdev.blog.csdn.net/article/details/122245662" class="tip" target="_blank">为什么被折叠?</a>
		 <a href="https://bbs.csdn.net/forums/FreeZone" class="park" target="_blank">
		 <img src="https://csdnimg.cn/release/blogv2/dist/pc/img/iconPark.png">到【灌水乐园】发言</a>                                
		</div>
		<div class="comment-fold-content"></div>
		<div id="lookBadComment" class="look-bad-comment side-look-comment">
			<a class="look-more-comment">查看更多评论<img src="https://csdnimg.cn/release/blogv2/dist/pc/img/commentArrowDownWhite.png" alt=""></a>
		</div>
	</div>
</div>
<div class="comment-rewarddialog-box">
  <div class="form-box">
    <div class="title-box">
      添加红包
      <a class="btn-form-close"></a>
    </div>
    <form id="commentRewardForm">
      <div class="ipt-box">
        <label for="txtName">祝福语</label>
        <div class="ipt-btn-box">
          <input type="text" name="name" id="txtName" autocomplete="off" maxlength="50">
          <a class="btn-ipt btn-random"></a>
        </div>
        <p class="notice">请填写红包祝福语或标题</p>
      </div>
      <div class="ipt-box">
        <label for="txtSendAmount">红包数量</label>
        <div class="ipt-txt-box">
          <input type="text" name="sendAmount" maxlength="4" id="txtSendAmount" placeholder="请填写红包数量(最小10个)" autocomplete="off">
          <span class="after-txt">个</span>
        </div>
        <p class="notice">红包个数最小为10个</p>
      </div>
      <div class="ipt-box">
        <label for="txtMoney">红包总金额</label>
        <div class="ipt-txt-box error">
          <input type="text" name="money" maxlength="5" id="txtMoney" placeholder="请填写总金额(最低5元)" autocomplete="off">
          <span class="after-txt">元</span>
        </div>
        <p class="notice">红包金额最低5元</p>
      </div>
      <div class="balance-info-box">
        <label>余额支付</label>
        <div class="balance-info">
          当前余额<span class="balance">3.43</span>元
          <a href="https://i.csdn.net/#/wallet/balance/recharge" class="link-charge" target="_blank">前往充值 ></a>
        </div>
      </div>
      <div class="opt-box">
        <div class="pay-info">
          需支付：<span class="price">10.00</span>元
        </div>
        <button type="button" class="ml-auto btn-cancel">取消</button>
        <button type="button" class="ml8 btn-submit" disabled="true">确定</button>
      </div>
    </form>
  </div>
</div>
<div class="rr-guide-box">
  <div class="rr-first-box">
    <img src="https://csdnimg.cn/release/blogv2/dist/pc/img/guideRedReward02.png" alt="">
    <button class="btn-guide-known next">下一步</button>
  </div>
  <div class="rr-second-box">
    <img src="https://csdnimg.cn/release/blogv2/dist/pc/img/guideRedReward03.png" alt="">
    <button class="btn-guide-known known">知道了</button>
  </div>
</div>
</div>

<div class="redEnvolope" id="redEnvolope">
  <div class="env-box">
    <div class="env-container">
      <div class="pre-open" id="preOpen">
        <div class="top">
          <header>
            <img class="clearTpaErr" :src="redpacketAuthor.avatar" alt="" />
            <div class="author">成就一亿技术人!</div>
          </header>
          <div class="bot-icon"></div>
        </div>
        <footer>
          <div class="red-openbtn open-start"></div>
          <div class="tip">
            领取后你会自动成为博主和红包主的粉丝
            <a class="rule" target="_blank">规则</a>
          </div>
        </footer>
      </div>
      <div class="opened" id="opened">
        <div class="bot-icon">
          <header>
            <a class="creatorUrl" href="" target="_blank">
              <img class="clearTpaErr" src="https://profile-avatar.csdnimg.cn/default.jpg!2" alt="" />
            </a>
            <div class="author">
              <div class="tt">hope_wisdom</div> 发出的红包
            </div>
          </header>
        </div>
        <div class="receive-box">
          <header></header>
          <div class="receive-list">
          </div>
        </div>
      </div>
    </div>
    <div class="close-btn"></div>
  </div>
</div>
      
      <div class="pay-code">
      <div class="pay-money">实付<span class="pay-money-span" data-nowprice='' data-oldprice=''>元</span></div>
      <div class="content-blance"><a class="blance-bt" href="javascript:;">使用余额支付</a></div>
      <div class="content-code">
        <div id="payCode" data-id="">
          <div class="renovate">
            <img src="https://csdnimg.cn/release/blogv2/dist/pc/img/pay-time-out.png">
            <span>点击重新获取</span>
          </div>
        </div>
        <div class="pay-style"><span><img src="https://csdnimg.cn/release/blogv2/dist/pc/img/weixin.png"></span><span><img src="https://csdnimg.cn/release/blogv2/dist/pc/img/zhifubao.png"></span><span><img src="https://csdnimg.cn/release/blogv2/dist/pc/img/jingdong.png"></span><span class="text">扫码支付</span></div>
      </div>
      <div class="bt-close">
        <svg t="1567152543821" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="10924" xmlns:xlink="http://www.w3.org/1999/xlink" width="12" height="12">
          <defs>
            <style type="text/css"></style>
          </defs>
          <path d="M512 438.378667L806.506667 143.893333a52.032 52.032 0 1 1 73.6 73.621334L585.621333 512l294.485334 294.485333a52.074667 52.074667 0 0 1-73.6 73.642667L512 585.621333 217.514667 880.128a52.053333 52.053333 0 1 1-73.621334-73.642667L438.378667 512 143.893333 217.514667a52.053333 52.053333 0 1 1 73.621334-73.621334L512 438.378667z" fill="" p-id="10925"></path>
        </svg>
      </div>
      <div class="pay-balance">
        <input type="radio" class="pay-code-radio" data-type="details">
        <span class="span">钱包余额</span>
          <span class="balance" style="color:#FC5531;font-size:14px;">0</span>
          <div class="pay-code-tile">
            <img src="https://csdnimg.cn/release/blogv2/dist/pc/img/pay-help.png" alt="">
            <div class="pay-code-content">
              <div class="span">
                <p class="title">抵扣说明：</p>
                <p> 1.余额是钱包充值的虚拟货币，按照1:1的比例进行支付金额的抵扣。<br> 2.余额无法直接购买下载，可以购买VIP、付费专栏及课程。</p>
              </div>
            </div>
          </div>
      </div>
      <a class="pay-balance-con" href="https://i.csdn.net/#/wallet/balance/recharge" target="_blank"><img src="https://csdnimg.cn/release/blogv2/dist/pc/img/recharge.png" alt=""><span>余额充值</span></a>
    </div>
    <div style="display:none;">
      <img src="" onerror='setTimeout(function(){if(!/(csdn.net|iteye.com|baiducontent.com|googleusercontent.com|360webcache.com|sogoucdn.com|bingj.com|baidu.com)$/.test(window.location.hostname)){window.location.href="\x68\x74\x74\x70\x73\x3a\x2f\x2f\x77\x77\x77\x2e\x63\x73\x64\x6e\x2e\x6e\x65\x74"}},3000);'>
    </div>
    <div class="keyword-dec-box" id="keywordDecBox"></div>
  <script type="text/javascript" src="//analyzev.oss-cn-beijing.aliyuncs.com/jquery-statistics.js"></script></body>
    <!-- 富文本柱状图  -->
    <link rel="stylesheet" href="https://csdnimg.cn/release/blog_editor_html/release1.6.12/ckeditor/plugins/chart/chart.css" />
    <script type="text/javascript" src="https://csdnimg.cn/release/blog_editor_html/release1.6.12/ckeditor/plugins/chart/lib/chart.min.js"></script>
    <script type="text/javascript" src="https://csdnimg.cn/release/blog_editor_html/release1.6.12/ckeditor/plugins/chart/widget2chart.js"></script>
  <script src="https://csdnimg.cn/release/blogv2/dist/components/js/axios-83fa28cedf.min.js" type="text/javascript"></script>
  <script src="https://csdnimg.cn/release/blogv2/dist/components/js/pc_wap_highlight-8defd55d6e.min.js" type="text/javascript"></script>
  <script src="https://csdnimg.cn/release/blogv2/dist/components/js/pc_wap_common-3b5f0393dc.min.js" type="text/javascript"></script>
  <script src="https://csdnimg.cn/release/blogv2/dist/components/js/edit_copy_code-3d1af13f20.min.js" type="text/javascript"></script>
  <script src="https://g.csdnimg.cn/lib/cboxEditor/1.1.6/embed-editor.min.js" type="text/javascript"></script>
  <link rel="stylesheet" href="https://g.csdnimg.cn/lib/cboxEditor/1.1.6/embed-editor.min.css">
  <link rel="stylesheet" href="https://csdnimg.cn/release/blog_editor_html/release1.6.12/ckeditor/plugins/codesnippet/lib/highlight/styles/atom-one-light.css">
  <script src="https://g.csdnimg.cn/user-accusation/1.0.6/user-accusation.js" type="text/javascript"></script>
  <script>
    // 全局声明
    if (window.csdn === undefined) {
      window.csdn = {};
    }
    var sideToolbarOpt = {}

    $(function() {
      $(document).on('click', "#toolReportBtnHideNormal,#toolReportBtnHide", function() {
        window.csdn.loginBox.key({
          biz: 'blog',
          subBiz: 'other_service',
          cb: function() {
            window.csdn.feedback({
              "type": 'blog',
              "rtype": 'article',
              "rid": articleId,
              "reportedName": username,
              "submitOptions": {
                "title": articleTitle,
                "contentUrl": articleDetailUrl
              },
              "callback": function() {
                showToast({
                  text: "感谢您的举报，我们会尽快审核！",
                  bottom: '10%',
                  zindex: 9000,
                  speed: 500,
                  time: 1500
                })
              }
            })
          }
        })
      });
    })
      window.csdn.sideToolbar = {
        options: {
          ...sideToolbarOpt,
          theme: 'white',
        }
      }
  </script>
    <script src="https://g.csdnimg.cn/baidu-search/1.0.12/baidu-search.js" type="text/javascript"></script>
  <script src="https://csdnimg.cn/release/download/old_static/js/qrcode.js"></script>
  <script src="https://g.csdnimg.cn/lib/qrcode/1.0.0/qrcode.min.js"></script>
  <script src="https://g.csdnimg.cn/user-ordercart/3.0.1/user-ordercart.js" type="text/javascript"></script>
  <script src="https://g.csdnimg.cn/user-ordertip/5.0.3/user-ordertip.js" type="text/javascript"></script>
  <script src="https://g.csdnimg.cn/order-payment/4.0.5/order-payment.js" type="text/javascript"></script>
  <script src="https://csdnimg.cn/release/blogv2/dist/pc/js/common-8344665efd.min.js" type="text/javascript"></script>
  <script src="https://csdnimg.cn/release/blogv2/dist/pc/js/detail-4c7850e5f1.min.js" type="text/javascript"></script>
  <script src="https://csdnimg.cn/release/blogv2/dist/pc/js/column-1dae17f1f8.min.js" type="text/javascript"></script>
    <script src="https://g.csdnimg.cn/side-toolbar/3.6/side-toolbar.js" type="text/javascript"></script>
  <script src="https://g.csdnimg.cn/copyright/1.0.4/copyright.js" type="text/javascript"></script>
  <script>
    $(".MathJax").remove();
    if ($('div.markdown_views pre.prettyprint code.hljs').length > 0) {
      $('div.markdown_views')[0].className = 'markdown_views';
    }
  </script>
  <script type="text/javascript" src="https://csdnimg.cn/release/blog_mathjax/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
  <script type="text/x-mathjax-config">
    MathJax.Hub.Config({
      "HTML-CSS": {
        linebreaks: { automatic: true, width: "94%container" },
        imageFont: null
      },
      tex2jax: {
      preview: "none",
      ignoreClass:"title-article"
      },
      mml2jax: {
      preview: 'none'
      }
    });
  </script>
<script type="text/javascript" crossorigin src="https://g.csdnimg.cn/common/csdn-login-box/csdn-login-box.js"></script></html>